Added MCP, Hybrid Memories and Skill support
This commit is contained in:
@@ -138,6 +138,7 @@ export class OpenAi extends LLMProvider {
|
||||
}
|
||||
}
|
||||
|
||||
if(resp.error) throw new Error(resp.error);
|
||||
const toolCalls = resp.choices[0].message.tool_calls || [];
|
||||
if(toolCalls.length && !controller.signal.aborted) {
|
||||
history.push(resp.choices[0].message);
|
||||
@@ -157,7 +158,7 @@ export class OpenAi extends LLMProvider {
|
||||
requestParams.messages = history;
|
||||
}
|
||||
} while (!controller.signal.aborted && resp.choices?.[0]?.message?.tool_calls?.length);
|
||||
history.push({role: 'assistant', content: resp.choices[0].message.content || ''});
|
||||
history.push({role: 'assistant', content: resp.choices[0].message.content.trim() || ''});
|
||||
history = this.toStandard(history);
|
||||
|
||||
if(options.stream) options.stream({done: true});
|
||||
|
||||
Reference in New Issue
Block a user