feat: 添加 AI 调用日志查询参数类型和分页查询接口
This commit is contained in:
@@ -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 })
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user