llm-proxy 1.3.5 → 1.3.7

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.
@@ -14,7 +14,7 @@ export interface OpenAIStreamResponse {
14
14
  index: number;
15
15
  delta: {
16
16
  content?: string;
17
- function_calls?: {
17
+ function_call?: {
18
18
  id?: string;
19
19
  name?: string;
20
20
  arguments?: string;
@@ -23,6 +23,21 @@ export interface OpenAIStreamResponse {
23
23
  };
24
24
  logprobs: string | null;
25
25
  finish_reason: string | null;
26
+ usage?: {
27
+ prompt_tokens: number;
28
+ completion_tokens: number;
29
+ total_tokens: number;
30
+ prompt_tokens_details: {
31
+ cached_tokens: number;
32
+ audio_tokens: number;
33
+ };
34
+ completion_tokens_details: {
35
+ reasoning_tokens: number;
36
+ audio_tokens: number;
37
+ accepted_prediction_tokens: number;
38
+ rejected_prediction_tokens: number;
39
+ };
40
+ };
26
41
  }
27
42
  export type OpenAISystemMessage = {
28
43
  role: "system";
@@ -79,6 +94,10 @@ export interface OpenAIResponse {
79
94
  message: {
80
95
  role: string;
81
96
  content: string;
97
+ function_call?: {
98
+ name: string;
99
+ arguments: any;
100
+ };
82
101
  };
83
102
  logprobs: null | object;
84
103
  finish_reason: string;
@@ -87,10 +106,10 @@ export interface OpenAIResponse {
87
106
  prompt_tokens: number;
88
107
  completion_tokens: number;
89
108
  total_tokens: number;
90
- prompt_tokens_details: {
109
+ prompt_tokens_details?: {
91
110
  cached_tokens: number;
92
111
  };
93
- completion_tokens_details: {
112
+ completion_tokens_details?: {
94
113
  reasoning_tokens: number;
95
114
  };
96
115
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,UAAU;AACV,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,mDAAsC,CAAA;IACtC,6CAAgC,CAAA;AAClC,CAAC,EAJW,SAAS,yBAAT,SAAS,Q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IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,4CAAa,CAAA;IACb,8CAAe,CAAA;IACf,oDAAqB,CAAA;IACrB,0DAA2B,CAAA;AAC7B,CAAC,EALW,2BAA2B,2CAA3B,2BAA2B,QAKtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llm-proxy",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "An LLM Proxy that allows the user to interact with different language models from different providers using unified request and response formats.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  "aws-sdk": "^2.1691.0",
31
31
  "axios": "^1.7.7",
32
32
  "dotenv": "^16.4.5",
33
- "llm-proxy": "^1.3.5",
33
+ "llm-proxy": "^1.3.7",
34
34
  "openai": "^4.69.0"
35
35
  }
36
36
  }