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 +0 -4
- package/dist/index.d.ts +5 -2
- package/dist/index.js +8 -8
- package/package.json +1 -1
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
|
-
|
|
38
|
-
|
|
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.
|
|
81
|
-
body.
|
|
82
|
-
if (input.
|
|
83
|
-
body.
|
|
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.
|
|
162
|
-
body.
|
|
163
|
-
if (input.
|
|
164
|
-
body.
|
|
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
|
}
|