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:
@@ -0,0 +1,58 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_call_log")
|
||||
public class AiCallLog extends BaseEntity {
|
||||
|
||||
@TableField("scene_code")
|
||||
private String sceneCode;
|
||||
|
||||
@TableField("provider_code")
|
||||
private String providerCode;
|
||||
|
||||
@TableField("endpoint_code")
|
||||
private String endpointCode;
|
||||
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@TableField("request_id")
|
||||
private String requestId;
|
||||
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@TableField("input_text")
|
||||
private String inputText;
|
||||
|
||||
@TableField("output_text")
|
||||
private String outputText;
|
||||
|
||||
@TableField("error_code")
|
||||
private String errorCode;
|
||||
|
||||
@TableField("error_message")
|
||||
private String errorMessage;
|
||||
|
||||
@TableField("first_token_ms")
|
||||
private Long firstTokenMs;
|
||||
|
||||
@TableField("duration_ms")
|
||||
private Long durationMs;
|
||||
|
||||
@TableField("stream_chunks")
|
||||
private Integer streamChunks;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_endpoint_config")
|
||||
public class AiEndpointConfig extends BaseEntity {
|
||||
|
||||
@TableField("endpoint_code")
|
||||
private String endpointCode;
|
||||
|
||||
@TableField("endpoint_name")
|
||||
private String endpointName;
|
||||
|
||||
@TableField("provider_id")
|
||||
private String providerId;
|
||||
|
||||
@TableField("endpoint_type")
|
||||
private String endpointType;
|
||||
|
||||
@TableField("api_path")
|
||||
private String apiPath;
|
||||
|
||||
@TableField("workflow_id")
|
||||
private String workflowId;
|
||||
|
||||
@TableField("bot_id")
|
||||
private String botId;
|
||||
|
||||
@TableField("model_name")
|
||||
private String modelName;
|
||||
|
||||
@TableField("response_mode")
|
||||
private String responseMode;
|
||||
|
||||
@TableField("request_template")
|
||||
private String requestTemplate;
|
||||
|
||||
@TableField("default_inputs")
|
||||
private String defaultInputs;
|
||||
|
||||
@TableField("custom_headers")
|
||||
private String customHeaders;
|
||||
|
||||
@TableField("timeout_ms")
|
||||
private Integer timeoutMs;
|
||||
|
||||
@TableField("support_stream")
|
||||
private Integer supportStream;
|
||||
|
||||
@TableField("is_enabled")
|
||||
private Integer isEnabled;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_provider")
|
||||
public class AiProvider extends BaseEntity {
|
||||
|
||||
@TableField("provider_code")
|
||||
private String providerCode;
|
||||
|
||||
@TableField("provider_name")
|
||||
private String providerName;
|
||||
|
||||
@TableField("provider_type")
|
||||
private String providerType;
|
||||
|
||||
@TableField("base_url")
|
||||
private String baseUrl;
|
||||
|
||||
@TableField("api_key")
|
||||
private String apiKey;
|
||||
|
||||
@TableField("auth_type")
|
||||
private String authType;
|
||||
|
||||
@TableField("default_headers")
|
||||
private String defaultHeaders;
|
||||
|
||||
@TableField("timeout_ms")
|
||||
private Integer timeoutMs;
|
||||
|
||||
@TableField("is_enabled")
|
||||
private Integer isEnabled;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_scene_binding")
|
||||
public class AiSceneBinding extends BaseEntity {
|
||||
|
||||
@TableField("scene_code")
|
||||
private String sceneCode;
|
||||
|
||||
@TableField("scene_name")
|
||||
private String sceneName;
|
||||
|
||||
@TableField("endpoint_id")
|
||||
private String endpointId;
|
||||
|
||||
@TableField("input_schema")
|
||||
private String inputSchema;
|
||||
|
||||
@TableField("prompt_template")
|
||||
private String promptTemplate;
|
||||
|
||||
@TableField("required_stream")
|
||||
private Integer requiredStream;
|
||||
|
||||
@TableField("priority")
|
||||
private Integer priority;
|
||||
|
||||
@TableField("is_enabled")
|
||||
private Integer isEnabled;
|
||||
|
||||
@TableField("version")
|
||||
private String version;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
}
|
||||
Reference in New Issue
Block a user