You've already forked bilibili-subtitle
支持gemini
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {TASK_EXPIRE_TIME} from '../const'
|
||||
import {handleChatCompleteTask} from './openaiService'
|
||||
import {handleChatCompleteTask, handleGeminiChatCompleteTask} from './openaiService'
|
||||
|
||||
export const tasksMap = new Map<string, Task>()
|
||||
|
||||
@@ -11,6 +11,9 @@ export const handleTask = async (task: Task) => {
|
||||
case 'chatComplete':
|
||||
await handleChatCompleteTask(task)
|
||||
break
|
||||
case 'geminiChatComplete':
|
||||
await handleGeminiChatCompleteTask(task)
|
||||
break
|
||||
default:
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
throw new Error(`任务类型不支持: ${task.def.type}`)
|
||||
|
Reference in New Issue
Block a user