( stream: ReadableStream<any>, )
| 90 | * @returns A promise that resolves to an array of `ToolCall` objects. |
| 91 | */ |
| 92 | export async function getToolsFromStream( |
| 93 | stream: ReadableStream<any>, |
| 94 | ): Promise<ToolCallResult[]> { |
| 95 | let run = getRunner(stream); |
| 96 | const {choices} = await run.finalChatCompletion(); |
| 97 | return choices[0].message.tool_calls; |
| 98 | } |
no test coverage detected