发布 0.1.0:通知渠道、告警规则、令牌版本与安全加固
This commit is contained in:
@@ -488,6 +488,7 @@ func TestAiContentLogSwitch(t *testing.T) {
|
||||
t.Error("超过 7 天上限应被拒绝")
|
||||
}
|
||||
// 写入与截断(带调用日志关联)
|
||||
mustCreate(t, gw.db, &model.AiCallLog{ID: 42, KeyID: key.ID, ChannelID: 0})
|
||||
gw.LogContent(model.AiContentLog{CallLogID: 42, KeyID: key.ID, KeyName: "k1", Endpoint: "openai", Model: "m", RequestBody: strings.Repeat("x", 70*1024)})
|
||||
rows, total, err := gw.ContentLogs(ctx, key.ID, 0, 1, 20)
|
||||
if err != nil || total != 1 || len(rows[0].RequestBody) != 64*1024 {
|
||||
|
||||
Reference in New Issue
Block a user