@aigne/deepseek 0.7.62 → 1.74.0-beta

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
@@ -2,28 +2,28 @@
2
2
 
3
3
  <p align="center">
4
4
  <picture>
5
- <source srcset="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/logo-dark.svg" media="(prefers-color-scheme: dark)">
6
- <source srcset="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/logo.svg" media="(prefers-color-scheme: light)">
7
- <img src="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/logo.svg" alt="AIGNE Logo" width="400" />
5
+ <source srcset="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/logo-dark.svg" media="(prefers-color-scheme: dark)">
6
+ <source srcset="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/logo.svg" media="(prefers-color-scheme: light)">
7
+ <img src="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/logo.svg" alt="AIGNE Logo" width="400" />
8
8
  </picture>
9
9
  </p>
10
10
 
11
- [![GitHub star chart](https://img.shields.io/github/stars/AIGNE-io/aigne-framework?style=flat-square)](https://star-history.com/#AIGNE-io/aigne-framework)
12
- [![Open Issues](https://img.shields.io/github/issues-raw/AIGNE-io/aigne-framework?style=flat-square)](https://github.com/AIGNE-io/aigne-framework/issues)
13
- [![codecov](https://codecov.io/gh/AIGNE-io/aigne-framework/graph/badge.svg?token=DO07834RQL)](https://codecov.io/gh/AIGNE-io/aigne-framework)
11
+ [![GitHub star chart](https://img.shields.io/github/stars/ArcBlock/aigne-framework?style=flat-square)](https://star-history.com/#ArcBlock/aigne-framework)
12
+ [![Open Issues](https://img.shields.io/github/issues-raw/ArcBlock/aigne-framework?style=flat-square)](https://github.com/ArcBlock/aigne-framework/issues)
13
+ [![codecov](https://codecov.io/gh/ArcBlock/aigne-framework/graph/badge.svg?token=DO07834RQL)](https://codecov.io/gh/ArcBlock/aigne-framework)
14
14
  [![NPM Version](https://img.shields.io/npm/v/@aigne/deepseek)](https://www.npmjs.com/package/@aigne/deepseek)
15
- [![Elastic-2.0 licensed](https://img.shields.io/npm/l/@aigne/deepseek)](https://github.com/AIGNE-io/aigne-framework/blob/main/LICENSE.md)
15
+ [![Elastic-2.0 licensed](https://img.shields.io/npm/l/@aigne/deepseek)](https://github.com/ArcBlock/aigne-framework/blob/main/LICENSE.md)
16
16
 
17
- AIGNE Deepseek SDK for integrating with Deepseek AI models within the [AIGNE Framework](https://github.com/AIGNE-io/aigne-framework).
17
+ AIGNE Deepseek SDK for integrating with Deepseek AI models within the [AIGNE Framework](https://github.com/ArcBlock/aigne-framework).
18
18
 
19
19
  ## Introduction
20
20
 
21
21
  `@aigne/deepseek` provides a seamless integration between the AIGNE Framework and Deepseek's powerful language models and API. This package enables developers to easily leverage Deepseek's AI models in their AIGNE applications, providing a consistent interface across the framework while taking advantage of Deepseek's advanced AI capabilities.
22
22
 
23
23
  <picture>
24
- <source srcset="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/assets/aigne-deepseek-dark.png" media="(prefers-color-scheme: dark)">
25
- <source srcset="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/assets/aigne-deepseek.png" media="(prefers-color-scheme: light)">
26
- <img src="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/aigne-deepseek.png" alt="AIGNE Arch" />
24
+ <source srcset="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/assets/aigne-deepseek-dark.png" media="(prefers-color-scheme: dark)">
25
+ <source srcset="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/assets/aigne-deepseek.png" media="(prefers-color-scheme: light)">
26
+ <img src="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/aigne-deepseek.png" alt="AIGNE Arch" />
27
27
  </picture>
28
28
 
29
29
  ## Features
@@ -0,0 +1,36 @@
1
+ let _aigne_openai = require("@aigne/openai");
2
+
3
+ //#region src/deepseek-chat-model.ts
4
+ const DEEPSEEK_DEFAULT_CHAT_MODEL = "deepseek-chat";
5
+ const DEEPSEEK_BASE_URL = "https://api.deepseek.com";
6
+ /**
7
+ * Implementation of the ChatModel interface for DeepSeek's API
8
+ *
9
+ * This model uses OpenAI-compatible API format to interact with DeepSeek's models,
10
+ * but with specific configuration and capabilities for DeepSeek.
11
+ *
12
+ * Default model: 'deepseek-chat'
13
+ *
14
+ * @example
15
+ * Here's how to create and use a DeepSeek chat model:
16
+ * {@includeCode ../test/deepseek-chat-model.test.ts#example-deepseek-chat-model}
17
+ *
18
+ * @example
19
+ * Here's an example with streaming response:
20
+ * {@includeCode ../test/deepseek-chat-model.test.ts#example-deepseek-chat-model-streaming}
21
+ */
22
+ var DeepSeekChatModel = class extends _aigne_openai.OpenAIChatModel {
23
+ constructor(options) {
24
+ super({
25
+ ...options,
26
+ model: options?.model || DEEPSEEK_DEFAULT_CHAT_MODEL,
27
+ baseURL: options?.baseURL || DEEPSEEK_BASE_URL
28
+ });
29
+ }
30
+ apiKeyEnvName = "DEEPSEEK_API_KEY";
31
+ supportsNativeStructuredOutputs = false;
32
+ supportsToolsEmptyParameters = false;
33
+ };
34
+
35
+ //#endregion
36
+ exports.DeepSeekChatModel = DeepSeekChatModel;
@@ -1,4 +1,6 @@
1
- import { OpenAIChatModel, type OpenAIChatModelOptions } from "@aigne/openai";
1
+ import { OpenAIChatModel, OpenAIChatModelOptions } from "@aigne/openai";
2
+
3
+ //#region src/deepseek-chat-model.d.ts
2
4
  /**
3
5
  * Implementation of the ChatModel interface for DeepSeek's API
4
6
  *
@@ -15,9 +17,12 @@ import { OpenAIChatModel, type OpenAIChatModelOptions } from "@aigne/openai";
15
17
  * Here's an example with streaming response:
16
18
  * {@includeCode ../test/deepseek-chat-model.test.ts#example-deepseek-chat-model-streaming}
17
19
  */
18
- export declare class DeepSeekChatModel extends OpenAIChatModel {
19
- constructor(options?: OpenAIChatModelOptions);
20
- protected apiKeyEnvName: string;
21
- protected supportsNativeStructuredOutputs: boolean;
22
- protected supportsToolsEmptyParameters: boolean;
20
+ declare class DeepSeekChatModel extends OpenAIChatModel {
21
+ constructor(options?: OpenAIChatModelOptions);
22
+ protected apiKeyEnvName: string;
23
+ protected supportsNativeStructuredOutputs: boolean;
24
+ protected supportsToolsEmptyParameters: boolean;
23
25
  }
26
+ //#endregion
27
+ export { DeepSeekChatModel };
28
+ //# sourceMappingURL=deepseek-chat-model.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepseek-chat-model.d.cts","names":[],"sources":["../src/deepseek-chat-model.ts"],"mappings":";;;;AAqBA;;;;;;;;;;;;;;;cAAa,iBAAA,SAA0B,eAAA;EAAA,YAAA,OAAA,GACf,sBAAA;EAAA,UAAA,aAAA;EAAA,UAAA,+BAAA;EAAA,UAAA,4BAAA;AAAA"}
@@ -1,4 +1,6 @@
1
- import { OpenAIChatModel, type OpenAIChatModelOptions } from "@aigne/openai";
1
+ import { OpenAIChatModel, OpenAIChatModelOptions } from "@aigne/openai";
2
+
3
+ //#region src/deepseek-chat-model.d.ts
2
4
  /**
3
5
  * Implementation of the ChatModel interface for DeepSeek's API
4
6
  *
@@ -15,9 +17,12 @@ import { OpenAIChatModel, type OpenAIChatModelOptions } from "@aigne/openai";
15
17
  * Here's an example with streaming response:
16
18
  * {@includeCode ../test/deepseek-chat-model.test.ts#example-deepseek-chat-model-streaming}
17
19
  */
18
- export declare class DeepSeekChatModel extends OpenAIChatModel {
19
- constructor(options?: OpenAIChatModelOptions);
20
- protected apiKeyEnvName: string;
21
- protected supportsNativeStructuredOutputs: boolean;
22
- protected supportsToolsEmptyParameters: boolean;
20
+ declare class DeepSeekChatModel extends OpenAIChatModel {
21
+ constructor(options?: OpenAIChatModelOptions);
22
+ protected apiKeyEnvName: string;
23
+ protected supportsNativeStructuredOutputs: boolean;
24
+ protected supportsToolsEmptyParameters: boolean;
23
25
  }
26
+ //#endregion
27
+ export { DeepSeekChatModel };
28
+ //# sourceMappingURL=deepseek-chat-model.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepseek-chat-model.d.mts","names":[],"sources":["../src/deepseek-chat-model.ts"],"mappings":";;;;AAqBA;;;;;;;;;;;;;;;cAAa,iBAAA,SAA0B,eAAA;EAAA,YAAA,OAAA,GACf,sBAAA;EAAA,UAAA,aAAA;EAAA,UAAA,+BAAA;EAAA,UAAA,4BAAA;AAAA"}
@@ -0,0 +1,37 @@
1
+ import { OpenAIChatModel } from "@aigne/openai";
2
+
3
+ //#region src/deepseek-chat-model.ts
4
+ const DEEPSEEK_DEFAULT_CHAT_MODEL = "deepseek-chat";
5
+ const DEEPSEEK_BASE_URL = "https://api.deepseek.com";
6
+ /**
7
+ * Implementation of the ChatModel interface for DeepSeek's API
8
+ *
9
+ * This model uses OpenAI-compatible API format to interact with DeepSeek's models,
10
+ * but with specific configuration and capabilities for DeepSeek.
11
+ *
12
+ * Default model: 'deepseek-chat'
13
+ *
14
+ * @example
15
+ * Here's how to create and use a DeepSeek chat model:
16
+ * {@includeCode ../test/deepseek-chat-model.test.ts#example-deepseek-chat-model}
17
+ *
18
+ * @example
19
+ * Here's an example with streaming response:
20
+ * {@includeCode ../test/deepseek-chat-model.test.ts#example-deepseek-chat-model-streaming}
21
+ */
22
+ var DeepSeekChatModel = class extends OpenAIChatModel {
23
+ constructor(options) {
24
+ super({
25
+ ...options,
26
+ model: options?.model || DEEPSEEK_DEFAULT_CHAT_MODEL,
27
+ baseURL: options?.baseURL || DEEPSEEK_BASE_URL
28
+ });
29
+ }
30
+ apiKeyEnvName = "DEEPSEEK_API_KEY";
31
+ supportsNativeStructuredOutputs = false;
32
+ supportsToolsEmptyParameters = false;
33
+ };
34
+
35
+ //#endregion
36
+ export { DeepSeekChatModel };
37
+ //# sourceMappingURL=deepseek-chat-model.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepseek-chat-model.mjs","names":[],"sources":["../src/deepseek-chat-model.ts"],"sourcesContent":["import { OpenAIChatModel, type OpenAIChatModelOptions } from \"@aigne/openai\";\n\nconst DEEPSEEK_DEFAULT_CHAT_MODEL = \"deepseek-chat\";\nconst DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\n/**\n * Implementation of the ChatModel interface for DeepSeek's API\n *\n * This model uses OpenAI-compatible API format to interact with DeepSeek's models,\n * but with specific configuration and capabilities for DeepSeek.\n *\n * Default model: 'deepseek-chat'\n *\n * @example\n * Here's how to create and use a DeepSeek chat model:\n * {@includeCode ../test/deepseek-chat-model.test.ts#example-deepseek-chat-model}\n *\n * @example\n * Here's an example with streaming response:\n * {@includeCode ../test/deepseek-chat-model.test.ts#example-deepseek-chat-model-streaming}\n */\nexport class DeepSeekChatModel extends OpenAIChatModel {\n constructor(options?: OpenAIChatModelOptions) {\n super({\n ...options,\n model: options?.model || DEEPSEEK_DEFAULT_CHAT_MODEL,\n baseURL: options?.baseURL || DEEPSEEK_BASE_URL,\n });\n }\n\n protected override apiKeyEnvName = \"DEEPSEEK_API_KEY\";\n protected override supportsNativeStructuredOutputs = false;\n protected override supportsToolsEmptyParameters = false;\n}\n"],"mappings":";;;AAEA,MAAM,8BAA8B;AACpC,MAAM,oBAAoB;;;;;;;;;;;;;;;;;AAkB1B,IAAa,oBAAb,cAAuC,gBAAgB;CACrD,YAAY,SAAkC;AAC5C,QAAM;GACJ,GAAG;GACH,OAAO,SAAS,SAAS;GACzB,SAAS,SAAS,WAAW;GAC9B,CAAC;;CAGJ,AAAmB,gBAAgB;CACnC,AAAmB,kCAAkC;CACrD,AAAmB,+BAA+B"}
package/dist/index.cjs ADDED
@@ -0,0 +1,3 @@
1
+ const require_deepseek_chat_model = require('./deepseek-chat-model.cjs');
2
+
3
+ exports.DeepSeekChatModel = require_deepseek_chat_model.DeepSeekChatModel;
@@ -0,0 +1,2 @@
1
+ import { DeepSeekChatModel } from "./deepseek-chat-model.cjs";
2
+ export { DeepSeekChatModel };
@@ -0,0 +1,2 @@
1
+ import { DeepSeekChatModel } from "./deepseek-chat-model.mjs";
2
+ export { DeepSeekChatModel };
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { DeepSeekChatModel } from "./deepseek-chat-model.mjs";
2
+
3
+ export { DeepSeekChatModel };
package/package.json CHANGED
@@ -1,57 +1,56 @@
1
1
  {
2
2
  "name": "@aigne/deepseek",
3
- "version": "0.7.62",
3
+ "version": "1.74.0-beta",
4
4
  "description": "AIGNE Deepseek SDK for integrating with Deepseek AI models",
5
+ "license": "Elastic-2.0",
5
6
  "publishConfig": {
6
7
  "access": "public"
7
8
  },
8
9
  "author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
9
10
  "homepage": "https://www.aigne.io/framework",
10
- "license": "Elastic-2.0",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/AIGNE-io/aigne-framework"
13
+ "url": "git+https://github.com/ArcBlock/aigne-framework"
14
14
  },
15
15
  "bugs": {
16
- "url": "https://github.com/AIGNE-io/aigne-framework/issues"
16
+ "url": "https://github.com/ArcBlock/aigne-framework/issues"
17
+ },
18
+ "type": "module",
19
+ "main": "./dist/index.cjs",
20
+ "module": "./dist/index.mjs",
21
+ "types": "./dist/index.d.cts",
22
+ "exports": {
23
+ ".": {
24
+ "require": "./dist/index.cjs",
25
+ "import": "./dist/index.mjs"
26
+ },
27
+ "./*": "./*"
17
28
  },
18
29
  "files": [
19
- "lib/cjs",
20
- "lib/dts",
21
- "lib/esm",
30
+ "dist",
22
31
  "LICENSE",
23
32
  "README.md",
24
33
  "CHANGELOG.md"
25
34
  ],
26
- "type": "module",
27
- "main": "./lib/cjs/index.js",
28
- "module": "./lib/esm/index.js",
29
- "types": "./lib/dts/index.d.ts",
30
- "exports": {
31
- ".": {
32
- "import": "./lib/esm/index.js",
33
- "require": "./lib/cjs/index.js",
34
- "types": "./lib/dts/index.d.ts"
35
- }
36
- },
37
35
  "dependencies": {
38
- "@aigne/openai": "^0.16.16"
36
+ "@aigne/openai": "^1.74.0-beta"
39
37
  },
40
38
  "devDependencies": {
41
- "@types/bun": "^1.2.22",
42
- "@types/node": "^24.5.1",
39
+ "@types/bun": "^1.3.6",
43
40
  "npm-run-all": "^4.1.5",
44
- "rimraf": "^6.0.1",
45
- "typescript": "^5.9.2",
46
- "@aigne/core": "^1.72.0",
47
- "@aigne/test-utils": "^0.5.69"
41
+ "rimraf": "^6.1.2",
42
+ "tsdown": "0.20.0-beta.3",
43
+ "typescript": "5.9.2",
44
+ "@aigne/core": "1.74.0-beta",
45
+ "@aigne/scripts": "0.0.0",
46
+ "@aigne/typescript-config": "0.0.0",
47
+ "@aigne/utils": "1.74.0-beta"
48
48
  },
49
49
  "scripts": {
50
- "lint": "tsc --noEmit",
51
- "build": "tsc --build scripts/tsconfig.build.json",
52
- "clean": "rimraf lib test/coverage",
50
+ "build": "tsdown",
51
+ "check-types": "tsc --noEmit",
52
+ "clean": "rimraf dist coverage",
53
53
  "test": "bun test",
54
- "test:coverage": "bun test --coverage --coverage-reporter=lcov --coverage-reporter=text",
55
- "postbuild": "node ../../scripts/post-build-lib.mjs"
54
+ "test:coverage": "bun test --coverage --coverage-reporter=lcov --coverage-reporter=text"
56
55
  }
57
56
  }