@outputai/llm 0.6.0 → 0.6.1-next.383b24b.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.d.ts +13 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outputai/llm",
3
- "version": "0.6.0",
3
+ "version": "0.6.1-next.383b24b.0",
4
4
  "description": "Framework abstraction to interact with LLM models",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -23,7 +23,7 @@
23
23
  "gray-matter": "4.0.3",
24
24
  "liquidjs": "10.25.7",
25
25
  "undici": "8.1.0",
26
- "@outputai/core": "0.6.0"
26
+ "@outputai/core": "0.6.1-next.383b24b.0"
27
27
  },
28
28
  "license": "Apache-2.0",
29
29
  "publishConfig": {
package/src/index.d.ts CHANGED
@@ -233,6 +233,19 @@ export type LLMCallCost = {
233
233
  message?: string;
234
234
  };
235
235
 
236
+ export type LLMUsageEvent = {
237
+ type: 'llm:usage';
238
+ modelId: string;
239
+ usage: Array<{
240
+ type: string;
241
+ ppm: number;
242
+ amount: number;
243
+ total: number;
244
+ }>;
245
+ total: number;
246
+ tokensUsed: number;
247
+ };
248
+
236
249
  /**
237
250
  * `streamText` and agent `stream` `onFinish` event after the stream response wrapper: same as the AI SDK
238
251
  * finish payload plus optional `cost` from pricing.