@fairyhunter13/ai-anthropic 3.0.58-fork.18 → 3.0.58-fork.19
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.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +9 -6
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +9 -6
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/convert-to-anthropic-messages-prompt.ts +9 -6
package/dist/index.js
CHANGED
|
@@ -2156,14 +2156,17 @@ async function convertToAnthropicMessagesPrompt({
|
|
|
2156
2156
|
functionality: "Multiple system messages that are separated by user/assistant messages"
|
|
2157
2157
|
});
|
|
2158
2158
|
}
|
|
2159
|
-
system = block.messages.map(({ content, providerOptions }) =>
|
|
2160
|
-
|
|
2161
|
-
text: content,
|
|
2162
|
-
cache_control: validator.getCacheControl(providerOptions, {
|
|
2159
|
+
system = block.messages.map(({ content, providerOptions }) => {
|
|
2160
|
+
const cc = validator.getCacheControl(providerOptions, {
|
|
2163
2161
|
type: "system message",
|
|
2164
2162
|
canCache: true
|
|
2165
|
-
})
|
|
2166
|
-
|
|
2163
|
+
});
|
|
2164
|
+
return {
|
|
2165
|
+
type: "text",
|
|
2166
|
+
text: content,
|
|
2167
|
+
cache_control: cc
|
|
2168
|
+
};
|
|
2169
|
+
});
|
|
2167
2170
|
break;
|
|
2168
2171
|
}
|
|
2169
2172
|
case "user": {
|