MCPcopy Index your code
hub / github.com/CommandCodeAI/BaseAI / getToolsFromStream

Function getToolsFromStream

packages/core/src/helpers/stream.ts:92–98  ·  view source on GitHub ↗
(
	stream: ReadableStream<any>,
)

Source from the content-addressed store, hash-verified

90 * @returns A promise that resolves to an array of `ToolCall` objects.
91 */
92export 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}

Callers 1

handleStreamResponseMethod · 0.90

Calls 1

getRunnerFunction · 0.85

Tested by

no test coverage detected