优化
This commit is contained in:
@@ -4,8 +4,8 @@ import { getAccessToken } from '@/utils/auth'
|
|||||||
// 使用公共配置
|
// 使用公共配置
|
||||||
import { API_BASE } from '@gold/config/api'
|
import { API_BASE } from '@gold/config/api'
|
||||||
|
|
||||||
// C 端使用 APP_AI,如果不存在则回退到 ADMIN_AI
|
// C 端使用 APP_AI
|
||||||
const SERVER_BASE_AI = API_BASE.APP_AI || API_BASE.ADMIN_AI
|
const SERVER_BASE_AI = API_BASE.APP_AI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import http from '@/api/http'
|
import http from '@/api/http'
|
||||||
import { API_BASE } from '@gold/config/api'
|
import { API_BASE } from '@gold/config/api'
|
||||||
|
|
||||||
// C 端使用 APP_AI,如果不存在则回退到 ADMIN_AI
|
// C 端使用 APP_AI
|
||||||
// 后端路径是 /app-api/ai/user-prompt,参考 chat API 的实现
|
// 后端路径是 /app-api/ai/user-prompt,参考 chat API 的实现
|
||||||
const SERVER_BASE_AI = API_BASE.APP_AI || API_BASE.ADMIN_AI
|
const SERVER_BASE_AI = API_BASE.APP_AI
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户提示词 API
|
* 用户提示词 API
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const speechRate = ref(1.0)
|
|||||||
const instruction = ref('neutral') // 指令参数,用于控制音色风格
|
const instruction = ref('neutral') // 指令参数,用于控制音色风格
|
||||||
const emotion = ref('neutral') // 情感参数
|
const emotion = ref('neutral') // 情感参数
|
||||||
const emotionActive = ref(false) // 是否激活情感tab(false为指令,true为情感)
|
const emotionActive = ref(false) // 是否激活情感tab(false为指令,true为情感)
|
||||||
const voiceSource = ref('system') // 音色来源:user 或 system
|
const voiceSource = ref('user') // 音色来源:user 或 system
|
||||||
|
|
||||||
// 系统音色库(使用CosyVoice v3-flash模型)
|
// 系统音色库(使用CosyVoice v3-flash模型)
|
||||||
const SYSTEM_VOICES = [
|
const SYSTEM_VOICES = [
|
||||||
@@ -704,7 +704,7 @@ let previewObjectUrl = ''
|
|||||||
|
|
||||||
<div class="voice-source-toggle">
|
<div class="voice-source-toggle">
|
||||||
<button
|
<button
|
||||||
v-for="source in ['user', 'system']"
|
v-for="source in ['user']"
|
||||||
:key="source"
|
:key="source"
|
||||||
class="source-btn"
|
class="source-btn"
|
||||||
:class="{ active: voiceSource === source }"
|
:class="{ active: voiceSource === source }"
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ export const API_BASE = {
|
|||||||
// 会员端 API
|
// 会员端 API
|
||||||
APP: `${BASE_URL}`,
|
APP: `${BASE_URL}`,
|
||||||
// 具体模块路径
|
// 具体模块路径
|
||||||
ADMIN_AI: `${BASE_URL}/admin-api/ai`,
|
APP_AI: `${BASE_URL}/api/ai`,
|
||||||
APP_AI: `${BASE_URL}/app-api/ai`,
|
|
||||||
APP_MEMBER: `${BASE_URL}/app-api/member`,
|
APP_MEMBER: `${BASE_URL}/app-api/member`,
|
||||||
|
|
||||||
// 特殊路径
|
// 特殊路径
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
|
|||||||
|
|
||||||
@Tag(name = "用户 App - AI 聊天对话")
|
@Tag(name = "用户 App - AI 聊天对话")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/ai/chat/conversation")
|
@RequestMapping("/api/chat/conversation")
|
||||||
@Validated
|
@Validated
|
||||||
public class AppAiChatConversationController {
|
public class AppAiChatConversationController {
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
|
|||||||
|
|
||||||
@Tag(name = "用户 App - 聊天消息")
|
@Tag(name = "用户 App - 聊天消息")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/ai/chat/message")
|
@RequestMapping("/api/chat/message")
|
||||||
@Validated
|
@Validated
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AppAiChatMessageController {
|
public class AppAiChatMessageController {
|
||||||
|
|||||||
Reference in New Issue
Block a user