新增字幕提问功能

This commit is contained in:
IndieKKY
2024-03-17 23:31:48 +08:00
parent d6d7e17f84
commit a86ba9e09f
8 changed files with 271 additions and 16 deletions

View File

@@ -1,4 +1,12 @@
import {getServerUrl} from '../util/biz_util'
const getServerUrl = (serverUrl?: string) => {
if (!serverUrl) {
return 'https://api.openai.com'
}
if (serverUrl.endsWith('/')) {
serverUrl = serverUrl.slice(0, -1)
}
return serverUrl
}
export const handleChatCompleteTask = async (task: Task) => {
const data = task.def.data