@petrgrishin/ai-sdk-ollama 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.cjs +12 -0
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +12 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1944,6 +1944,18 @@ var OllamaChatLanguageModel = class {
|
|
|
1944
1944
|
id: currentTextId
|
|
1945
1945
|
});
|
|
1946
1946
|
}
|
|
1947
|
+
if (chunk.message && chunk.message.tool_calls && chunk.message.tool_calls.length > 0) {
|
|
1948
|
+
hasToolCalls = true;
|
|
1949
|
+
for (const toolCall of chunk.message.tool_calls) {
|
|
1950
|
+
const toolInput = toolCall.function.arguments || {};
|
|
1951
|
+
controller.enqueue({
|
|
1952
|
+
type: "tool-call",
|
|
1953
|
+
toolCallId: crypto.randomUUID(),
|
|
1954
|
+
toolName: toolCall.function.name,
|
|
1955
|
+
input: JSON.stringify(toolInput)
|
|
1956
|
+
});
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1947
1959
|
usage = createUsage(
|
|
1948
1960
|
chunk.prompt_eval_count ?? void 0,
|
|
1949
1961
|
chunk.eval_count ?? void 0
|