Commit aac7852c authored by 周成波's avatar 周成波

对接通义千问,流程中增加总结角色环节

parent e32979e9
......@@ -8,7 +8,7 @@ export default {
if (!prompt) {
return Promise.reject("输入不能为空");
}
const post_data = { source_text: prompt }
const post_data = { source_text: prompt, llm: 'tyqw' }
return request.post('/text2video/text2gpt', post_data)
.then((res: any) => {
// console.log(res);
......
......@@ -34,6 +34,7 @@ export default class utils {
// 拆分文本
static splitText(str: string) {
str = str.replaceAll('“','').replaceAll('”','')
// 使用正则表达式拆分文本
let sentences = str.split(/[!|?|。]/);
// 过滤掉长度为 0 的句子
......
This diff is collapsed.
......@@ -21,4 +21,9 @@ declare namespace Wm {
"img_path": string,
}
interface RolesItem {
"角色": string,
"角色关键词": string,
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment