@xsai/text-chat 1.0.0-beta.4 → 1.0.0-beta.6
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 +3 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ class ChatEventStream extends WireEventStream {
|
|
|
43
43
|
}));
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
+
builder.meta({ model: chunk.model });
|
|
46
47
|
if (chunk.usage != null)
|
|
47
48
|
builder.meta({ usage: normalizeUsage(chunk.usage) });
|
|
48
49
|
for (const choice of chunk.choices ?? []) {
|
|
@@ -226,6 +227,8 @@ const normalizeAssistantMessage = (message) => {
|
|
|
226
227
|
};
|
|
227
228
|
const normalizeUserPart = (part) => {
|
|
228
229
|
switch (part.type) {
|
|
230
|
+
case "audio":
|
|
231
|
+
return { input_audio: { data: part.data, format: part.format }, type: "input_audio" };
|
|
229
232
|
case "file":
|
|
230
233
|
return normalizeFilePart(part);
|
|
231
234
|
case "image":
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsai/text-chat",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.6",
|
|
5
5
|
"description": "extra-small AI SDK: OpenAI Chat Completions API model for @xsai/text.",
|
|
6
6
|
"author": "Moeru AI",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"node": ">=26"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@xsai/text": "1.0.0-beta.
|
|
37
|
+
"@xsai/text": "1.0.0-beta.6"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@xsai/shared": "1.0.0-beta.
|
|
40
|
+
"@xsai/shared": "1.0.0-beta.6"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@xsai/text": "1.0.0-beta.
|
|
43
|
+
"@xsai/text": "1.0.0-beta.6",
|
|
44
44
|
"zod": "^4.3.6"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|