@core-ai/mistral 0.3.0 → 0.4.0
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 +14 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -186,8 +186,13 @@ async function* transformStream(stream) {
|
|
|
186
186
|
let usage = {
|
|
187
187
|
inputTokens: 0,
|
|
188
188
|
outputTokens: 0,
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
inputTokenDetails: {
|
|
190
|
+
cacheReadTokens: 0,
|
|
191
|
+
cacheWriteTokens: 0
|
|
192
|
+
},
|
|
193
|
+
outputTokenDetails: {
|
|
194
|
+
reasoningTokens: 0
|
|
195
|
+
}
|
|
191
196
|
};
|
|
192
197
|
for await (const event of stream) {
|
|
193
198
|
const chunk = event.data;
|
|
@@ -307,8 +312,13 @@ function mapUsage(usage) {
|
|
|
307
312
|
return {
|
|
308
313
|
inputTokens: usage?.promptTokens ?? 0,
|
|
309
314
|
outputTokens: usage?.completionTokens ?? 0,
|
|
310
|
-
|
|
311
|
-
|
|
315
|
+
inputTokenDetails: {
|
|
316
|
+
cacheReadTokens: 0,
|
|
317
|
+
cacheWriteTokens: 0
|
|
318
|
+
},
|
|
319
|
+
outputTokenDetails: {
|
|
320
|
+
reasoningTokens: 0
|
|
321
|
+
}
|
|
312
322
|
};
|
|
313
323
|
}
|
|
314
324
|
function extractTextContent(content) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@core-ai/mistral",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Mistral provider package for @core-ai/core-ai",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Omnifact (https://omnifact.ai)",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"test:watch": "vitest"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@core-ai/core-ai": "^0.
|
|
45
|
+
"@core-ai/core-ai": "^0.4.0",
|
|
46
46
|
"@mistralai/mistralai": "^1.14.0",
|
|
47
47
|
"zod-to-json-schema": "^3.25.1"
|
|
48
48
|
},
|