feat: session id (#4817)

* feat: session id

* feat: Add default index
This commit is contained in:
Archer
2025-05-14 17:24:02 +08:00
committed by GitHub
parent cba8f773fe
commit a4db03a3b7
10 changed files with 248 additions and 75 deletions

View File

@@ -135,8 +135,8 @@ export const llmStreamResponseToAnswerText = async (
// Tool calls
if (responseChoice?.tool_calls?.length) {
responseChoice.tool_calls.forEach((toolCall) => {
const index = toolCall.index;
responseChoice.tool_calls.forEach((toolCall, i) => {
const index = toolCall.index ?? i;
if (toolCall.id || callingTool) {
// 有 id代表新 call 工具