@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.js
CHANGED
|
@@ -1911,6 +1911,18 @@ var OllamaChatLanguageModel = class {
|
|
|
1911
1911
|
id: currentTextId
|
|
1912
1912
|
});
|
|
1913
1913
|
}
|
|
1914
|
+
if (chunk.message && chunk.message.tool_calls && chunk.message.tool_calls.length > 0) {
|
|
1915
|
+
hasToolCalls = true;
|
|
1916
|
+
for (const toolCall of chunk.message.tool_calls) {
|
|
1917
|
+
const toolInput = toolCall.function.arguments || {};
|
|
1918
|
+
controller.enqueue({
|
|
1919
|
+
type: "tool-call",
|
|
1920
|
+
toolCallId: crypto.randomUUID(),
|
|
1921
|
+
toolName: toolCall.function.name,
|
|
1922
|
+
input: JSON.stringify(toolInput)
|
|
1923
|
+
});
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1914
1926
|
usage = createUsage(
|
|
1915
1927
|
chunk.prompt_eval_count ?? void 0,
|
|
1916
1928
|
chunk.eval_count ?? void 0
|