@ai-sdk/anthropic
Advanced tools
Comparing version 0.0.26 to 0.0.27
@@ -62,3 +62,4 @@ "use strict"; | ||
const messages = []; | ||
for (const block of blocks) { | ||
for (let i = 0; i < blocks.length; i++) { | ||
const block = blocks[i]; | ||
const type = block.type; | ||
@@ -142,5 +143,8 @@ switch (type) { | ||
role: "assistant", | ||
content: content.map((part) => { | ||
content: content.map((part, j) => { | ||
switch (part.type) { | ||
case "text": { | ||
if (i === blocks.length - 1 && j === block.messages.length - 1) { | ||
return { type: "text", text: part.text.trim() }; | ||
} | ||
return { type: "text", text: part.text }; | ||
@@ -147,0 +151,0 @@ } |
@@ -62,3 +62,4 @@ "use strict"; | ||
const messages = []; | ||
for (const block of blocks) { | ||
for (let i = 0; i < blocks.length; i++) { | ||
const block = blocks[i]; | ||
const type = block.type; | ||
@@ -142,5 +143,8 @@ switch (type) { | ||
role: "assistant", | ||
content: content.map((part) => { | ||
content: content.map((part, j) => { | ||
switch (part.type) { | ||
case "text": { | ||
if (i === blocks.length - 1 && j === block.messages.length - 1) { | ||
return { type: "text", text: part.text.trim() }; | ||
} | ||
return { type: "text", text: part.text }; | ||
@@ -147,0 +151,0 @@ } |
{ | ||
"name": "@ai-sdk/anthropic", | ||
"version": "0.0.26", | ||
"version": "0.0.27", | ||
"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
159307
2151