|
@@ -1052,6 +1052,11 @@ export default {
|
|
},
|
|
},
|
|
// 发送消息
|
|
// 发送消息
|
|
send(_text = this.textareaValue) {
|
|
send(_text = this.textareaValue) {
|
|
|
|
+ var OpenCC = require("opencc-js");
|
|
|
|
+ let converter = OpenCC.Converter({
|
|
|
|
+ from:'cn',
|
|
|
|
+ to:'hk'
|
|
|
|
+ })
|
|
this.textareaValue = "";
|
|
this.textareaValue = "";
|
|
// 判断输入的文本是否为空
|
|
// 判断输入的文本是否为空
|
|
if (!_text.trim()) return;
|
|
if (!_text.trim()) return;
|
|
@@ -1121,7 +1126,7 @@ export default {
|
|
this.ajax
|
|
this.ajax
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- if (res.data.FunctionResponse.result == "发送成功") {
|
|
|
|
|
|
+ if (converter(res.data.FunctionResponse.result) == converter("发送成功")) {
|
|
} else {
|
|
} else {
|
|
this.$message.warning(res.data.FunctionResponse.result);
|
|
this.$message.warning(res.data.FunctionResponse.result);
|
|
}
|
|
}
|
|
@@ -1183,11 +1188,12 @@ export default {
|
|
// uid: _uuid,
|
|
// uid: _uuid,
|
|
// model: "Claude 3 Sonnet", // Claude 3 Sonnet或者Claude 3 Haiku
|
|
// model: "Claude 3 Sonnet", // Claude 3 Sonnet或者Claude 3 Haiku
|
|
// });
|
|
// });
|
|
|
|
+
|
|
this.ajax
|
|
this.ajax
|
|
.post("https://gpt4.cocorobo.cn/chat", params)
|
|
.post("https://gpt4.cocorobo.cn/chat", params)
|
|
// .post("https://claude3.cocorobo.cn/chat", params)
|
|
// .post("https://claude3.cocorobo.cn/chat", params)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- if (res.data.FunctionResponse.result == "发送成功") {
|
|
|
|
|
|
+ if (converter(res.data.FunctionResponse.result) == converter("发送成功")) {
|
|
} else {
|
|
} else {
|
|
this.$message.warning(res.data.FunctionResponse.result);
|
|
this.$message.warning(res.data.FunctionResponse.result);
|
|
}
|
|
}
|