@aigne/aigne-hub 0.4.0 → 0.4.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +47 -18
  3. package/package.json +18 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.2](https://github.com/AIGNE-io/aigne-framework/compare/aigne-hub-v0.4.1...aigne-hub-v0.4.2) (2025-08-05)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @aigne/anthropic bumped to 0.10.7
11
+ * @aigne/bedrock bumped to 0.8.11
12
+ * @aigne/core bumped to 1.43.1
13
+ * @aigne/deepseek bumped to 0.7.11
14
+ * @aigne/default-memory bumped to 1.0.11
15
+ * @aigne/gemini bumped to 0.8.11
16
+ * @aigne/ollama bumped to 0.7.11
17
+ * @aigne/open-router bumped to 0.7.11
18
+ * @aigne/openai bumped to 0.10.11
19
+ * @aigne/transport bumped to 0.11.2
20
+ * @aigne/xai bumped to 0.7.11
21
+ * devDependencies
22
+ * @aigne/openai bumped to 0.10.11
23
+ * @aigne/test-utils bumped to 0.5.19
24
+
25
+ ## [0.4.1](https://github.com/AIGNE-io/aigne-framework/compare/aigne-hub-v0.4.0...aigne-hub-v0.4.1) (2025-08-04)
26
+
27
+
28
+ ### Dependencies
29
+
30
+ * The following workspace dependencies were updated
31
+ * dependencies
32
+ * @aigne/anthropic bumped to 0.10.6
33
+ * @aigne/bedrock bumped to 0.8.10
34
+ * @aigne/core bumped to 1.43.0
35
+ * @aigne/deepseek bumped to 0.7.10
36
+ * @aigne/default-memory bumped to 1.0.10
37
+ * @aigne/gemini bumped to 0.8.10
38
+ * @aigne/ollama bumped to 0.7.10
39
+ * @aigne/open-router bumped to 0.7.10
40
+ * @aigne/openai bumped to 0.10.10
41
+ * @aigne/transport bumped to 0.11.1
42
+ * @aigne/xai bumped to 0.7.10
43
+ * devDependencies
44
+ * @aigne/openai bumped to 0.10.10
45
+ * @aigne/test-utils bumped to 0.5.18
46
+
3
47
  ## [0.4.0](https://github.com/AIGNE-io/aigne-framework/compare/aigne-hub-v0.3.2...aigne-hub-v0.4.0) (2025-08-01)
4
48
 
5
49
 
package/README.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @aigne/aigne-hub
2
2
 
3
+ <p align="center">
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" />
8
+ </picture>
9
+ </p>
10
+
3
11
  [![GitHub stars](https://img.shields.io/github/stars/AIGNE-io/aigne-framework?style=flat-square)](https://star-history.com/#AIGNE-io/aigne-framework)
4
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)
5
13
  [![codecov](https://codecov.io/gh/AIGNE-io/aigne-framework/graph/badge.svg?token=DO07834RQL)](https://codecov.io/gh/AIGNE-io/aigne-framework)
@@ -19,41 +27,58 @@ It enables you to switch providers without changing your client-side logic.
19
27
  The AIGNE Hub backend supports the following AI providers via a single, unified API:
20
28
 
21
29
  ```ts
22
- type AIProvider = 'openai' | 'anthropic' | 'bedrock' | 'deepseek' | 'google' | 'ollama' | 'openRouter' | 'xai';
30
+ type AIProvider =
31
+ | "openai"
32
+ | "anthropic"
33
+ | "bedrock"
34
+ | "deepseek"
35
+ | "google"
36
+ | "ollama"
37
+ | "openRouter"
38
+ | "xai";
23
39
  ```
40
+
24
41
  ## Example models:
25
- - openai/gpt-4o-mini
26
- - anthropic/claude-3-sonnet
27
- - bedrock/us.amazon.titan-text-lite-v1
28
- - google/gemini-pro
29
- - xai/grok-1
30
- - openRouter/mistralai/mistral-7b-instruct
31
- - ollama/llama3
42
+
43
+ * openai/gpt-4o-mini
44
+ * anthropic/claude-3-sonnet
45
+ * bedrock/us.amazon.titan-text-lite-v1
46
+ * google/gemini-pro
47
+ * xai/grok-1
48
+ * openRouter/mistralai/mistral-7b-instruct
49
+ * ollama/llama3
32
50
 
33
51
  ## Features
34
- - 🔌 Unified LLM Access: Route all requests through one endpoint
35
- - 🧠 Multi-provider Support: Choose from any supported vendor via the model name
36
- - 🔐 API Key Security: Use accessKey to manage authentication and authorization
37
- - 💬 Chat Completions: Works with standard messages format ({ role, content })
38
- - 🌊 Streaming Support: Enable streaming: true for real-time token-level responses
39
- - 🧱 Framework Compatible: Seamless integration with the AIGNE Framework
52
+
53
+ * 🔌 Unified LLM Access: Route all requests through one endpoint
54
+ * 🧠 Multi-provider Support: Choose from any supported vendor via the model name
55
+ * 🔐 API Key Security: Use accessKey to manage authentication and authorization
56
+ * 💬 Chat Completions: Works with standard messages format ({ role, content })
57
+ * 🌊 Streaming Support: Enable streaming: true for real-time token-level responses
58
+ * 🧱 Framework Compatible: Seamless integration with the AIGNE Framework
40
59
 
41
60
  ## Installation
61
+
42
62
  ### Using npm
43
63
 
44
64
  ```
45
65
  npm install @aigne/aigne-hub @aigne/core
46
66
  ```
67
+
47
68
  ### Using yarn
69
+
48
70
  ```
49
71
  yarn add @aigne/aigne-hub @aigne/core
50
72
  ```
73
+
51
74
  ### Using pnpm
75
+
52
76
  ```
53
77
  pnpm add @aigne/aigne-hub @aigne/core
54
78
  ```
55
79
 
56
80
  ## Basic Usage
81
+
57
82
  ```typescript
58
83
  import { AIGNEHubChatModel } from "@aigne/aigne-hub";
59
84
 
@@ -79,7 +104,9 @@ console.log(result);
79
104
  }
80
105
  */
81
106
  ```
107
+
82
108
  ## Streaming Usage
109
+
83
110
  ```typescript
84
111
  import { AIGNEHubChatModel } from "@aigne/aigne-hub";
85
112
 
@@ -110,13 +137,15 @@ for await (const chunk of stream) {
110
137
  console.log(fullText); // Output: "Hello! How can I assist you today?"
111
138
  console.log(json); // { model: "gpt-4o", usage: { inputTokens: 10, outputTokens: 9 } }
112
139
  ```
140
+
113
141
  ## Configuration Options
142
+
114
143
  ```typescript
115
144
  interface ClientChatModelOptions {
116
- url: string; // Your AIGNE Hub endpoint
117
- accessKey: string; // API access key
118
- model: string; // Model name with provider prefix (e.g. openai/gpt-4o-mini)
119
- modelOptions?: object; // Optional model-specific parameters
145
+ url: string; // Your AIGNE Hub endpoint
146
+ accessKey: string; // API access key
147
+ model: string; // Model name with provider prefix (e.g. openai/gpt-4o-mini)
148
+ modelOptions?: object; // Optional model-specific parameters
120
149
  }
121
150
  ```
122
151
 
package/package.json CHANGED
@@ -1,17 +1,20 @@
1
1
  {
2
2
  "name": "@aigne/aigne-hub",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "AIGNE Hub SDK for integrating with Hub AI models",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
9
- "homepage": "https://github.com/AIGNE-io/aigne-framework",
9
+ "homepage": "https://www.aigne.io/framework",
10
10
  "license": "Elastic-2.0",
11
11
  "repository": {
12
12
  "type": "git",
13
13
  "url": "git+https://github.com/AIGNE-io/aigne-framework"
14
14
  },
15
+ "bugs": {
16
+ "url": "https://github.com/AIGNE-io/aigne-framework/issues"
17
+ },
15
18
  "files": [
16
19
  "lib/cjs",
17
20
  "lib/dts",
@@ -42,18 +45,18 @@
42
45
  "openai": "^5.8.3",
43
46
  "ufo": "^1.6.1",
44
47
  "zod": "^3.25.67",
45
- "@aigne/anthropic": "^0.10.5",
46
- "@aigne/bedrock": "^0.8.9",
47
- "@aigne/core": "^1.42.0",
48
- "@aigne/deepseek": "^0.7.9",
49
- "@aigne/default-memory": "^1.0.9",
50
- "@aigne/ollama": "^0.7.9",
51
- "@aigne/open-router": "^0.7.9",
52
- "@aigne/openai": "^0.10.9",
48
+ "@aigne/anthropic": "^0.10.7",
49
+ "@aigne/bedrock": "^0.8.11",
50
+ "@aigne/core": "^1.43.1",
51
+ "@aigne/default-memory": "^1.0.11",
52
+ "@aigne/deepseek": "^0.7.11",
53
+ "@aigne/ollama": "^0.7.11",
54
+ "@aigne/gemini": "^0.8.11",
55
+ "@aigne/openai": "^0.10.11",
56
+ "@aigne/open-router": "^0.7.11",
53
57
  "@aigne/platform-helpers": "^0.5.0",
54
- "@aigne/gemini": "^0.8.9",
55
- "@aigne/transport": "^0.11.0",
56
- "@aigne/xai": "^0.7.9"
58
+ "@aigne/transport": "^0.11.2",
59
+ "@aigne/xai": "^0.7.11"
57
60
  },
58
61
  "devDependencies": {
59
62
  "@types/bun": "^1.2.18",
@@ -62,8 +65,8 @@
62
65
  "npm-run-all": "^4.1.5",
63
66
  "rimraf": "^6.0.1",
64
67
  "typescript": "^5.8.3",
65
- "@aigne/test-utils": "^0.5.17",
66
- "@aigne/openai": "^0.10.9"
68
+ "@aigne/test-utils": "^0.5.19",
69
+ "@aigne/openai": "^0.10.11"
67
70
  },
68
71
  "scripts": {
69
72
  "lint": "tsc --noEmit",