@ai-sdk/cohere
Advanced tools
Comparing version 1.1.6 to 1.1.7
# @ai-sdk/cohere | ||
## 1.1.7 | ||
### Patch Changes | ||
- 4d5e0a9: fix (provider/cohere): omit tool plan content from normal response text | ||
## 1.1.6 | ||
@@ -4,0 +10,0 @@ |
@@ -298,3 +298,3 @@ "use strict"; | ||
async doGenerate(options) { | ||
var _a, _b, _c, _d, _e; | ||
var _a, _b, _c, _d; | ||
const { warnings, ...args } = this.getArgs(options); | ||
@@ -315,5 +315,2 @@ args.tools = args.tools && this.removeJsonSchemaExtras(args.tools); | ||
let text = (_c = (_b = (_a = response.message.content) == null ? void 0 : _a[0]) == null ? void 0 : _b.text) != null ? _c : ""; | ||
if (!text) { | ||
text = (_d = response.message.tool_plan) != null ? _d : ""; | ||
} | ||
return { | ||
@@ -339,3 +336,3 @@ text, | ||
response: { | ||
id: (_e = response.generation_id) != null ? _e : void 0 | ||
id: (_d = response.generation_id) != null ? _d : void 0 | ||
}, | ||
@@ -393,9 +390,2 @@ rawResponse: { headers: responseHeaders }, | ||
} | ||
case "tool-plan-delta": { | ||
controller.enqueue({ | ||
type: "text-delta", | ||
textDelta: value.delta.message.tool_plan | ||
}); | ||
return; | ||
} | ||
case "tool-call-start": { | ||
@@ -402,0 +392,0 @@ pendingToolCallDelta = { |
{ | ||
"name": "@ai-sdk/cohere", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
143526
1435