@ai-sdk/solid
Advanced tools
Comparing version 0.0.6 to 0.0.7
# @ai-sdk/solid | ||
## 0.0.7 | ||
### Patch Changes | ||
- Updated dependencies [54bf4083] | ||
- @ai-sdk/ui-utils@0.0.6 | ||
## 0.0.6 | ||
@@ -4,0 +11,0 @@ |
@@ -94,23 +94,25 @@ "use strict"; | ||
const existingData = (_a = streamData()) != null ? _a : []; | ||
const constructedMessagesPayload = sendExtraMessageFields ? chatRequest.messages : chatRequest.messages.map( | ||
({ | ||
role, | ||
content, | ||
name, | ||
data: data2, | ||
annotations, | ||
function_call | ||
}) => ({ | ||
role, | ||
content, | ||
...name !== void 0 && { name }, | ||
...data2 !== void 0 && { data: data2 }, | ||
...annotations !== void 0 && { annotations }, | ||
// outdated function/tool call handling (TODO deprecate): | ||
...function_call !== void 0 && { function_call } | ||
}) | ||
); | ||
return await (0, import_ui_utils.callChatApi)({ | ||
api, | ||
messages: sendExtraMessageFields ? chatRequest.messages : chatRequest.messages.map( | ||
({ | ||
role, | ||
content, | ||
name, | ||
data: data2, | ||
annotations, | ||
function_call | ||
}) => ({ | ||
role, | ||
content, | ||
...name !== void 0 && { name }, | ||
...data2 !== void 0 && { data: data2 }, | ||
...annotations !== void 0 && { annotations }, | ||
// outdated function/tool call handling (TODO deprecate): | ||
...function_call !== void 0 && { function_call } | ||
}) | ||
), | ||
messages: constructedMessagesPayload, | ||
body: { | ||
messages: constructedMessagesPayload, | ||
data: chatRequest.data, | ||
@@ -117,0 +119,0 @@ ...body, |
{ | ||
"name": "@ai-sdk/solid", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"license": "Apache-2.0", | ||
@@ -18,3 +18,3 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@ai-sdk/ui-utils": "0.0.5", | ||
"@ai-sdk/ui-utils": "0.0.6", | ||
"swr-store": "0.10.6", | ||
@@ -21,0 +21,0 @@ "solid-swr-store": "0.10.7" |
@@ -148,25 +148,28 @@ import type { | ||
const constructedMessagesPayload = sendExtraMessageFields | ||
? chatRequest.messages | ||
: chatRequest.messages.map( | ||
({ | ||
role, | ||
content, | ||
name, | ||
data, | ||
annotations, | ||
function_call, | ||
}) => ({ | ||
role, | ||
content, | ||
...(name !== undefined && { name }), | ||
...(data !== undefined && { data }), | ||
...(annotations !== undefined && { annotations }), | ||
// outdated function/tool call handling (TODO deprecate): | ||
...(function_call !== undefined && { function_call }), | ||
}), | ||
); | ||
return await callChatApi({ | ||
api, | ||
messages: sendExtraMessageFields | ||
? chatRequest.messages | ||
: chatRequest.messages.map( | ||
({ | ||
role, | ||
content, | ||
name, | ||
data, | ||
annotations, | ||
function_call, | ||
}) => ({ | ||
role, | ||
content, | ||
...(name !== undefined && { name }), | ||
...(data !== undefined && { data }), | ||
...(annotations !== undefined && { annotations }), | ||
// outdated function/tool call handling (TODO deprecate): | ||
...(function_call !== undefined && { function_call }), | ||
}), | ||
), | ||
messages: constructedMessagesPayload, | ||
body: { | ||
messages: constructedMessagesPayload, | ||
data: chatRequest.data, | ||
@@ -173,0 +176,0 @@ ...body, |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88596
1442
+ Added@ai-sdk/ui-utils@0.0.6(transitive)
- Removed@ai-sdk/ui-utils@0.0.5(transitive)
Updated@ai-sdk/ui-utils@0.0.6