feat: 添加 AI 调用日志查询参数类型和分页查询接口

This commit is contained in:
2026-05-24 11:45:49 +08:00
parent b39a9b8b4b
commit 902068387b
2 changed files with 21 additions and 0 deletions
+9
View File
@@ -9,6 +9,7 @@ import type {
AiRuntimeRequest,
AiEndpointRuntimeRequest
} from '@/types/aiconfig'
import type { LogQueryParams, PageResult } from '@/types/common'
// 分页查询AI配置
export function getAiConfigPage(params: AiConfigPageRequest) {
@@ -269,6 +270,14 @@ export function listAiCallLogs(limit = 50) {
return request({ url: '/ai/call-logs', method: 'get', params: { limit } })
}
export function queryAiCallLogs(params: LogQueryParams) {
return request<PageResult<AiCallLog>>({
url: '/ai/call-logs',
method: 'post',
data: params
})
}
export function testAiRuntime(data: AiRuntimeRequest) {
return request({ url: '/ai/runtime/test', method: 'post', data, timeout: 60000 })
}
+12
View File
@@ -27,3 +27,15 @@ export interface MenuItem {
hidden?: boolean
}
}
export interface LogQueryParams {
status?: string
sceneCode?: string
providerCode?: string
endpointCode?: string
startTime?: string
endTime?: string
keyword?: string
pageNum?: number
pageSize?: number
}