|
@@ -188,6 +188,11 @@
|
|
|
import { v4 as uuidv4 } from "uuid";
|
|
|
import MarkdownIt from "markdown-it";
|
|
|
import { tools } from "../../../common/tools";
|
|
|
+var OpenCC = require("opencc-js");
|
|
|
+let converter = OpenCC.Converter({
|
|
|
+ from:'hk',
|
|
|
+ to:'cn'
|
|
|
+})
|
|
|
export default {
|
|
|
props: {
|
|
|
courseDetail: {
|
|
@@ -682,7 +687,7 @@ export default {
|
|
|
// .post("https://gpt4.cocorobo.cn/chat", params)
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
|
|
|
.then(res => {
|
|
|
- if (res.data.FunctionResponse.result == "发送成功") {
|
|
|
+ if (converter(res.data.FunctionResponse.result) == converter("发送成功")) {
|
|
|
} else {
|
|
|
// this.$message.warning(res.data.FunctionResponse.result);
|
|
|
console.log(res.data.FunctionResponse.result)
|
|
@@ -903,7 +908,7 @@ Instruction: Based on the context, follow "Format example", write content.
|
|
|
.post("https://gpt4.cocorobo.cn/ai_agent_park_chat_new", params)
|
|
|
// .post("https://gpt4.cocorobo.cn/chat", params)
|
|
|
.then(res => {
|
|
|
- if (res.data.FunctionResponse.result == "发送成功") {
|
|
|
+ if (converter(res.data.FunctionResponse.result) == converter("发送成功")) {
|
|
|
} else {
|
|
|
//this.$message.warning(res.data.FunctionResponse.result);
|
|
|
console.log(res.data.FunctionResponse.result)
|