This commit is contained in:
lloydzhou
2024-08-30 23:39:08 +08:00
parent 271f58d9cf
commit 9326ff9d08
10 changed files with 47 additions and 28 deletions

View File

@@ -243,13 +243,15 @@ export class ChatGPTApi implements LLMApi {
if (shouldStream) {
const [tools, funcs] = usePluginStore
.getState()
.getAsTools(useChatStore.getState().currentSession().mask?.plugin);
.getAsTools(
useChatStore.getState().currentSession().mask?.plugin as string[],
);
console.log("getAsTools", tools, funcs);
stream(
chatPath,
requestPayload,
getHeaders(),
tools,
tools as any,
funcs,
controller,
// parseSSE