edgee 0.1.4 → 0.1.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/README.md CHANGED
@@ -20,11 +20,7 @@ const edgee = new Edgee("your-api-key");
20
20
 
21
21
  // Send a simple request
22
22
  const response = await edgee.send({
23
- <<<<<<< HEAD
24
- model: 'gpt-5.2',
25
- =======
26
23
  model: 'anthropic/claude-haiku-4-5',
27
- >>>>>>> ecec4c8 (feat: update compression response to new API format)
28
24
  input: 'What is the capital of France?',
29
25
  });
30
26
 
package/dist/index.d.ts CHANGED
@@ -34,8 +34,11 @@ export interface InputObject {
34
34
  tools?: Tool[];
35
35
  tool_choice?: ToolChoice;
36
36
  tags?: string[];
37
- enable_compression?: boolean;
38
- compression_rate?: number;
37
+ compression_model?: "agentic" | "claude" | "opencode" | "cursor" | "customer";
38
+ compression_configuration?: {
39
+ rate?: number;
40
+ semantic_preservation_threshold?: number;
41
+ };
39
42
  }
40
43
  export interface SendOptions {
41
44
  model: string;
package/dist/index.js CHANGED
@@ -77,10 +77,10 @@ export default class Edgee {
77
77
  body.tool_choice = input.tool_choice;
78
78
  if (input.tags)
79
79
  body.tags = input.tags;
80
- if (input.enable_compression !== undefined)
81
- body.enable_compression = input.enable_compression;
82
- if (input.compression_rate !== undefined)
83
- body.compression_rate = input.compression_rate;
80
+ if (input.compression_model)
81
+ body.compression_model = input.compression_model;
82
+ if (input.compression_configuration)
83
+ body.compression_configuration = input.compression_configuration;
84
84
  }
85
85
  const res = await fetch(`${this.baseUrl}/v1/chat/completions`, {
86
86
  method: "POST",
@@ -158,10 +158,10 @@ export default class Edgee {
158
158
  body.tool_choice = input.tool_choice;
159
159
  if (input.tags)
160
160
  body.tags = input.tags;
161
- if (input.enable_compression !== undefined)
162
- body.enable_compression = input.enable_compression;
163
- if (input.compression_rate !== undefined)
164
- body.compression_rate = input.compression_rate;
161
+ if (input.compression_model)
162
+ body.compression_model = input.compression_model;
163
+ if (input.compression_configuration)
164
+ body.compression_configuration = input.compression_configuration;
165
165
  }
166
166
  yield* this._handleStreamingResponse(`${this.baseUrl}/v1/chat/completions`, body);
167
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edgee",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",