@assistant-ui/react 0.5.32 → 0.5.33
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.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1023,17 +1023,19 @@ var EdgeChatAdapter = class {
|
|
1023
1023
|
this.options = options;
|
1024
1024
|
}
|
1025
1025
|
async *run({ messages, abortSignal, config }) {
|
1026
|
+
const headers = new Headers(this.options.headers);
|
1027
|
+
headers.set("Content-Type", "application/json");
|
1026
1028
|
const result = await fetch(this.options.api, {
|
1027
1029
|
method: "POST",
|
1028
|
-
headers
|
1029
|
-
|
1030
|
-
},
|
1030
|
+
headers,
|
1031
|
+
credentials: this.options.credentials ?? "same-origin",
|
1031
1032
|
body: JSON.stringify({
|
1032
1033
|
system: config.system,
|
1033
1034
|
messages: toCoreMessages(messages),
|
1034
1035
|
tools: config.tools ? toLanguageModelTools(config.tools) : [],
|
1035
1036
|
...config.callSettings,
|
1036
|
-
...config.config
|
1037
|
+
...config.config,
|
1038
|
+
...this.options.body
|
1037
1039
|
}),
|
1038
1040
|
signal: abortSignal
|
1039
1041
|
});
|