@prestyj/ai 4.3.56 → 4.3.58
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/LICENSE +21 -0
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
type Provider = "anthropic" | "xiaomi" | "openai" | "glm" | "moonshot" | "minimax" | "openrouter" | "palsu";
|
|
3
|
+
type Provider = "anthropic" | "xiaomi" | "openai" | "glm" | "moonshot" | "minimax" | "deepseek" | "openrouter" | "palsu";
|
|
4
4
|
type ThinkingLevel = "low" | "medium" | "high" | "max";
|
|
5
5
|
type CacheRetention = "none" | "short" | "long";
|
|
6
6
|
interface TextContent {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
type Provider = "anthropic" | "xiaomi" | "openai" | "glm" | "moonshot" | "minimax" | "openrouter" | "palsu";
|
|
3
|
+
type Provider = "anthropic" | "xiaomi" | "openai" | "glm" | "moonshot" | "minimax" | "deepseek" | "openrouter" | "palsu";
|
|
4
4
|
type ThinkingLevel = "low" | "medium" | "high" | "max";
|
|
5
5
|
type CacheRetention = "none" | "short" | "long";
|
|
6
6
|
interface TextContent {
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,9 @@ var ProviderError = class extends EZCoderAIError {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
// src/providers/anthropic.ts
|
|
20
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
21
|
+
|
|
19
22
|
// src/utils/event-stream.ts
|
|
20
23
|
var EventStream = class {
|
|
21
24
|
queue = [];
|
|
@@ -116,9 +119,6 @@ var StreamResult = class {
|
|
|
116
119
|
}
|
|
117
120
|
};
|
|
118
121
|
|
|
119
|
-
// src/providers/anthropic.ts
|
|
120
|
-
import Anthropic from "@anthropic-ai/sdk";
|
|
121
|
-
|
|
122
122
|
// src/utils/zod-to-json-schema.ts
|
|
123
123
|
import { z } from "zod";
|
|
124
124
|
function zodToJsonSchema(schema) {
|
|
@@ -1608,6 +1608,12 @@ providerRegistry.register("moonshot", {
|
|
|
1608
1608
|
baseUrl: options.baseUrl ?? "https://api.moonshot.ai/v1"
|
|
1609
1609
|
})
|
|
1610
1610
|
});
|
|
1611
|
+
providerRegistry.register("deepseek", {
|
|
1612
|
+
stream: (options) => streamOpenAI({
|
|
1613
|
+
...options,
|
|
1614
|
+
baseUrl: options.baseUrl ?? "https://api.deepseek.com/v1"
|
|
1615
|
+
})
|
|
1616
|
+
});
|
|
1611
1617
|
providerRegistry.register("openrouter", {
|
|
1612
1618
|
stream: (options) => streamOpenAI({
|
|
1613
1619
|
...options,
|