feat: AI 场景路由、ASR 服务及前后端全链路同步
- 新增 AI 场景路由控制器和管理接口 - 新增 ASR 语音识别服务及前后端集成 - 同步 AI Runtime 客户端到 Web/小程序/Life-Script - 完善 AI 配置测试修复和管理后台路由配置 - 新增数据库迁移脚本 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,7 @@ const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: 'list',
|
||||
name: 'AiConfigList',
|
||||
component: () => import('@/views/aiconfig/AiConfigList.vue'),
|
||||
component: () => import('@/views/aiconfig/AiRoutingList.vue'),
|
||||
meta: { title: 'AI配置列表' }
|
||||
}
|
||||
]
|
||||
|
||||
@@ -185,4 +185,92 @@ export const ENVIRONMENT_OPTIONS = [
|
||||
export const CURRENCY_OPTIONS = [
|
||||
{ label: '美元', value: 'USD' },
|
||||
{ label: '人民币', value: 'CNY' }
|
||||
]
|
||||
]
|
||||
|
||||
export interface AiProvider {
|
||||
id?: string
|
||||
providerCode: string
|
||||
providerName: string
|
||||
providerType: string
|
||||
baseUrl: string
|
||||
apiKey?: string
|
||||
authType?: string
|
||||
defaultHeaders?: string
|
||||
timeoutMs?: number
|
||||
isEnabled?: number
|
||||
description?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export interface AiEndpointConfig {
|
||||
id?: string
|
||||
endpointCode: string
|
||||
endpointName: string
|
||||
providerId: string
|
||||
endpointType: string
|
||||
apiPath?: string
|
||||
workflowId?: string
|
||||
botId?: string
|
||||
modelName?: string
|
||||
responseMode?: string
|
||||
requestTemplate?: string
|
||||
defaultInputs?: string
|
||||
customHeaders?: string
|
||||
timeoutMs?: number
|
||||
supportStream?: number
|
||||
isEnabled?: number
|
||||
description?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export interface AiSceneBinding {
|
||||
id?: string
|
||||
sceneCode: string
|
||||
sceneName: string
|
||||
endpointId: string
|
||||
inputSchema?: string
|
||||
promptTemplate?: string
|
||||
requiredStream?: number
|
||||
priority?: number
|
||||
isEnabled?: number
|
||||
version?: string
|
||||
description?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export interface AiCallLog {
|
||||
id: string
|
||||
sceneCode?: string
|
||||
providerCode?: string
|
||||
endpointCode?: string
|
||||
userId?: string
|
||||
requestId?: string
|
||||
status?: string
|
||||
inputText?: string
|
||||
outputText?: string
|
||||
errorCode?: string
|
||||
errorMessage?: string
|
||||
firstTokenMs?: number
|
||||
durationMs?: number
|
||||
streamChunks?: number
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface AiRuntimeRequest {
|
||||
sceneCode: string
|
||||
userId?: string
|
||||
inputs: Record<string, any>
|
||||
}
|
||||
|
||||
export interface AiRuntimeTestResponse {
|
||||
sceneCode: string
|
||||
status: string
|
||||
output?: string
|
||||
durationMs?: number
|
||||
streamChunks?: number
|
||||
errorCode?: string
|
||||
errorMessage?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user