@aigne/aigne-hub 0.2.2 → 0.3.1
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/CHANGELOG.md +29 -0
- package/lib/{esm/hub-model.d.ts → cjs/blocklet-aigne-hub-model.d.ts} +2 -2
- package/lib/cjs/{hub-model.js → blocklet-aigne-hub-model.js} +6 -6
- package/lib/cjs/{aigne-hub-model.d.ts → cli-aigne-hub-model.d.ts} +1 -1
- package/lib/cjs/{aigne-hub-model.js → cli-aigne-hub-model.js} +3 -3
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.js +4 -4
- package/lib/dts/{hub-model.d.ts → blocklet-aigne-hub-model.d.ts} +2 -2
- package/lib/dts/{aigne-hub-model.d.ts → cli-aigne-hub-model.d.ts} +1 -1
- package/lib/dts/index.d.ts +1 -1
- package/lib/{cjs/hub-model.d.ts → esm/blocklet-aigne-hub-model.d.ts} +2 -2
- package/lib/esm/{hub-model.js → blocklet-aigne-hub-model.js} +4 -4
- package/lib/esm/{aigne-hub-model.d.ts → cli-aigne-hub-model.d.ts} +1 -1
- package/lib/esm/{aigne-hub-model.js → cli-aigne-hub-model.js} +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +4 -4
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.1](https://github.com/AIGNE-io/aigne-framework/compare/aigne-hub-v0.3.0...aigne-hub-v0.3.1) (2025-07-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @aigne/anthropic bumped to 0.10.3
|
|
11
|
+
* @aigne/bedrock bumped to 0.8.7
|
|
12
|
+
* @aigne/core bumped to 1.40.0
|
|
13
|
+
* @aigne/deepseek bumped to 0.7.7
|
|
14
|
+
* @aigne/default-memory bumped to 1.0.7
|
|
15
|
+
* @aigne/gemini bumped to 0.8.7
|
|
16
|
+
* @aigne/ollama bumped to 0.7.7
|
|
17
|
+
* @aigne/open-router bumped to 0.7.7
|
|
18
|
+
* @aigne/openai bumped to 0.10.7
|
|
19
|
+
* @aigne/transport bumped to 0.10.7
|
|
20
|
+
* @aigne/xai bumped to 0.7.7
|
|
21
|
+
* devDependencies
|
|
22
|
+
* @aigne/openai bumped to 0.10.7
|
|
23
|
+
* @aigne/test-utils bumped to 0.5.15
|
|
24
|
+
|
|
25
|
+
## [0.3.0](https://github.com/AIGNE-io/aigne-framework/compare/aigne-hub-v0.2.2...aigne-hub-v0.3.0) (2025-07-30)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* support aigne connect command and add test ([#283](https://github.com/AIGNE-io/aigne-framework/issues/283)) ([387d22d](https://github.com/AIGNE-io/aigne-framework/commit/387d22d5cacf20abe02a13deaca1f36987d48ba5))
|
|
31
|
+
|
|
3
32
|
## [0.2.2](https://github.com/AIGNE-io/aigne-framework/compare/aigne-hub-v0.2.1...aigne-hub-v0.2.2) (2025-07-28)
|
|
4
33
|
|
|
5
34
|
|
|
@@ -3,9 +3,9 @@ import { type BedrockChatModelOptions } from "@aigne/bedrock";
|
|
|
3
3
|
import { type AgentInvokeOptions, type AgentProcessResult, ChatModel, type ChatModelInput, type ChatModelOutput } from "@aigne/core";
|
|
4
4
|
import type { PromiseOrValue } from "@aigne/core/utils/type-utils.js";
|
|
5
5
|
import { type OpenAIChatModelOptions } from "@aigne/openai";
|
|
6
|
-
import { type AIGNEHubChatModelOptions } from "./aigne-hub-model.js";
|
|
6
|
+
import { type AIGNEHubChatModelOptions } from "./cli-aigne-hub-model.js";
|
|
7
7
|
export type HubChatModelOptions = AIGNEHubChatModelOptions | AnthropicChatModelOptions | BedrockChatModelOptions | OpenAIChatModelOptions;
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class BlockletAIGNEHubChatModel extends ChatModel {
|
|
9
9
|
options: HubChatModelOptions & {
|
|
10
10
|
apiKey?: string;
|
|
11
11
|
baseURL?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BlockletAIGNEHubChatModel = void 0;
|
|
4
4
|
const anthropic_1 = require("@aigne/anthropic");
|
|
5
5
|
const bedrock_1 = require("@aigne/bedrock");
|
|
6
6
|
const core_1 = require("@aigne/core");
|
|
@@ -10,7 +10,7 @@ const ollama_1 = require("@aigne/ollama");
|
|
|
10
10
|
const open_router_1 = require("@aigne/open-router");
|
|
11
11
|
const openai_1 = require("@aigne/openai");
|
|
12
12
|
const xai_1 = require("@aigne/xai");
|
|
13
|
-
const
|
|
13
|
+
const cli_aigne_hub_model_js_1 = require("./cli-aigne-hub-model.js");
|
|
14
14
|
function availableModels() {
|
|
15
15
|
return [
|
|
16
16
|
{
|
|
@@ -54,13 +54,13 @@ function availableModels() {
|
|
|
54
54
|
create: (params) => new xai_1.XAIChatModel({ ...params }),
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
name:
|
|
57
|
+
name: cli_aigne_hub_model_js_1.CliAIGNEHubChatModel.name,
|
|
58
58
|
apiKeyEnvName: "AIGNE_HUB_API_KEY",
|
|
59
|
-
create: (params) => new
|
|
59
|
+
create: (params) => new cli_aigne_hub_model_js_1.CliAIGNEHubChatModel({ ...params }),
|
|
60
60
|
},
|
|
61
61
|
];
|
|
62
62
|
}
|
|
63
|
-
class
|
|
63
|
+
class BlockletAIGNEHubChatModel extends core_1.ChatModel {
|
|
64
64
|
options;
|
|
65
65
|
client;
|
|
66
66
|
constructor(options) {
|
|
@@ -93,4 +93,4 @@ class HubChatModel extends core_1.ChatModel {
|
|
|
93
93
|
return this.client.invoke(input, options);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
exports.
|
|
96
|
+
exports.BlockletAIGNEHubChatModel = BlockletAIGNEHubChatModel;
|
|
@@ -8,7 +8,7 @@ export interface AIGNEHubChatModelOptions {
|
|
|
8
8
|
modelOptions?: ChatModelOptions;
|
|
9
9
|
clientOptions?: OpenAIChatModelOptions["clientOptions"];
|
|
10
10
|
}
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class CliAIGNEHubChatModel extends ChatModel {
|
|
12
12
|
options: AIGNEHubChatModelOptions;
|
|
13
13
|
private client;
|
|
14
14
|
constructor(options: AIGNEHubChatModelOptions);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.CliAIGNEHubChatModel = void 0;
|
|
4
4
|
const core_1 = require("@aigne/core");
|
|
5
5
|
const type_utils_js_1 = require("@aigne/core/utils/type-utils.js");
|
|
6
6
|
const base_client_js_1 = require("@aigne/transport/http-client/base-client.js");
|
|
@@ -24,7 +24,7 @@ const aigneHubChatModelOptionsSchema = zod_1.z.object({
|
|
|
24
24
|
.optional(),
|
|
25
25
|
clientOptions: zod_1.z.object({}).optional(),
|
|
26
26
|
});
|
|
27
|
-
class
|
|
27
|
+
class CliAIGNEHubChatModel extends core_1.ChatModel {
|
|
28
28
|
options;
|
|
29
29
|
client;
|
|
30
30
|
constructor(options) {
|
|
@@ -42,4 +42,4 @@ class AIGNEHubChatModel extends core_1.ChatModel {
|
|
|
42
42
|
return this.client.__invoke(undefined, input, options);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
exports.
|
|
45
|
+
exports.CliAIGNEHubChatModel = CliAIGNEHubChatModel;
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AgentInvokeOptions, type AgentProcessResult, ChatModel, type ChatModelInput, type ChatModelOutput } from "@aigne/core";
|
|
2
2
|
import type { PromiseOrValue } from "@aigne/core/utils/type-utils.js";
|
|
3
|
-
import { type HubChatModelOptions } from "./hub-model.js";
|
|
3
|
+
import { type HubChatModelOptions } from "./blocklet-aigne-hub-model.js";
|
|
4
4
|
export declare class AIGNEHubChatModel extends ChatModel {
|
|
5
5
|
options: HubChatModelOptions;
|
|
6
6
|
private client;
|
package/lib/cjs/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AIGNEHubChatModel = void 0;
|
|
4
4
|
const core_1 = require("@aigne/core");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const blocklet_aigne_hub_model_js_1 = require("./blocklet-aigne-hub-model.js");
|
|
6
|
+
const cli_aigne_hub_model_js_1 = require("./cli-aigne-hub-model.js");
|
|
7
7
|
class AIGNEHubChatModel extends core_1.ChatModel {
|
|
8
8
|
options;
|
|
9
9
|
client;
|
|
@@ -11,8 +11,8 @@ class AIGNEHubChatModel extends core_1.ChatModel {
|
|
|
11
11
|
super();
|
|
12
12
|
this.options = options;
|
|
13
13
|
this.client = process.env.BLOCKLET_AIGNE_API_PROVIDER
|
|
14
|
-
? new
|
|
15
|
-
: new
|
|
14
|
+
? new blocklet_aigne_hub_model_js_1.BlockletAIGNEHubChatModel(options)
|
|
15
|
+
: new cli_aigne_hub_model_js_1.CliAIGNEHubChatModel(options);
|
|
16
16
|
}
|
|
17
17
|
process(input, options) {
|
|
18
18
|
return this.client.process(input, options);
|
|
@@ -3,9 +3,9 @@ import { type BedrockChatModelOptions } from "@aigne/bedrock";
|
|
|
3
3
|
import { type AgentInvokeOptions, type AgentProcessResult, ChatModel, type ChatModelInput, type ChatModelOutput } from "@aigne/core";
|
|
4
4
|
import type { PromiseOrValue } from "@aigne/core/utils/type-utils.js";
|
|
5
5
|
import { type OpenAIChatModelOptions } from "@aigne/openai";
|
|
6
|
-
import { type AIGNEHubChatModelOptions } from "./aigne-hub-model.js";
|
|
6
|
+
import { type AIGNEHubChatModelOptions } from "./cli-aigne-hub-model.js";
|
|
7
7
|
export type HubChatModelOptions = AIGNEHubChatModelOptions | AnthropicChatModelOptions | BedrockChatModelOptions | OpenAIChatModelOptions;
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class BlockletAIGNEHubChatModel extends ChatModel {
|
|
9
9
|
options: HubChatModelOptions & {
|
|
10
10
|
apiKey?: string;
|
|
11
11
|
baseURL?: string;
|
|
@@ -8,7 +8,7 @@ export interface AIGNEHubChatModelOptions {
|
|
|
8
8
|
modelOptions?: ChatModelOptions;
|
|
9
9
|
clientOptions?: OpenAIChatModelOptions["clientOptions"];
|
|
10
10
|
}
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class CliAIGNEHubChatModel extends ChatModel {
|
|
12
12
|
options: AIGNEHubChatModelOptions;
|
|
13
13
|
private client;
|
|
14
14
|
constructor(options: AIGNEHubChatModelOptions);
|
package/lib/dts/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AgentInvokeOptions, type AgentProcessResult, ChatModel, type ChatModelInput, type ChatModelOutput } from "@aigne/core";
|
|
2
2
|
import type { PromiseOrValue } from "@aigne/core/utils/type-utils.js";
|
|
3
|
-
import { type HubChatModelOptions } from "./hub-model.js";
|
|
3
|
+
import { type HubChatModelOptions } from "./blocklet-aigne-hub-model.js";
|
|
4
4
|
export declare class AIGNEHubChatModel extends ChatModel {
|
|
5
5
|
options: HubChatModelOptions;
|
|
6
6
|
private client;
|
|
@@ -3,9 +3,9 @@ import { type BedrockChatModelOptions } from "@aigne/bedrock";
|
|
|
3
3
|
import { type AgentInvokeOptions, type AgentProcessResult, ChatModel, type ChatModelInput, type ChatModelOutput } from "@aigne/core";
|
|
4
4
|
import type { PromiseOrValue } from "@aigne/core/utils/type-utils.js";
|
|
5
5
|
import { type OpenAIChatModelOptions } from "@aigne/openai";
|
|
6
|
-
import { type AIGNEHubChatModelOptions } from "./aigne-hub-model.js";
|
|
6
|
+
import { type AIGNEHubChatModelOptions } from "./cli-aigne-hub-model.js";
|
|
7
7
|
export type HubChatModelOptions = AIGNEHubChatModelOptions | AnthropicChatModelOptions | BedrockChatModelOptions | OpenAIChatModelOptions;
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class BlockletAIGNEHubChatModel extends ChatModel {
|
|
9
9
|
options: HubChatModelOptions & {
|
|
10
10
|
apiKey?: string;
|
|
11
11
|
baseURL?: string;
|
|
@@ -7,7 +7,7 @@ import { OllamaChatModel } from "@aigne/ollama";
|
|
|
7
7
|
import { OpenRouterChatModel } from "@aigne/open-router";
|
|
8
8
|
import { OpenAIChatModel } from "@aigne/openai";
|
|
9
9
|
import { XAIChatModel } from "@aigne/xai";
|
|
10
|
-
import {
|
|
10
|
+
import { CliAIGNEHubChatModel } from "./cli-aigne-hub-model.js";
|
|
11
11
|
function availableModels() {
|
|
12
12
|
return [
|
|
13
13
|
{
|
|
@@ -51,13 +51,13 @@ function availableModels() {
|
|
|
51
51
|
create: (params) => new XAIChatModel({ ...params }),
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
name:
|
|
54
|
+
name: CliAIGNEHubChatModel.name,
|
|
55
55
|
apiKeyEnvName: "AIGNE_HUB_API_KEY",
|
|
56
|
-
create: (params) => new
|
|
56
|
+
create: (params) => new CliAIGNEHubChatModel({ ...params }),
|
|
57
57
|
},
|
|
58
58
|
];
|
|
59
59
|
}
|
|
60
|
-
export class
|
|
60
|
+
export class BlockletAIGNEHubChatModel extends ChatModel {
|
|
61
61
|
options;
|
|
62
62
|
client;
|
|
63
63
|
constructor(options) {
|
|
@@ -8,7 +8,7 @@ export interface AIGNEHubChatModelOptions {
|
|
|
8
8
|
modelOptions?: ChatModelOptions;
|
|
9
9
|
clientOptions?: OpenAIChatModelOptions["clientOptions"];
|
|
10
10
|
}
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class CliAIGNEHubChatModel extends ChatModel {
|
|
12
12
|
options: AIGNEHubChatModelOptions;
|
|
13
13
|
private client;
|
|
14
14
|
constructor(options: AIGNEHubChatModelOptions);
|
|
@@ -21,7 +21,7 @@ const aigneHubChatModelOptionsSchema = z.object({
|
|
|
21
21
|
.optional(),
|
|
22
22
|
clientOptions: z.object({}).optional(),
|
|
23
23
|
});
|
|
24
|
-
export class
|
|
24
|
+
export class CliAIGNEHubChatModel extends ChatModel {
|
|
25
25
|
options;
|
|
26
26
|
client;
|
|
27
27
|
constructor(options) {
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AgentInvokeOptions, type AgentProcessResult, ChatModel, type ChatModelInput, type ChatModelOutput } from "@aigne/core";
|
|
2
2
|
import type { PromiseOrValue } from "@aigne/core/utils/type-utils.js";
|
|
3
|
-
import { type HubChatModelOptions } from "./hub-model.js";
|
|
3
|
+
import { type HubChatModelOptions } from "./blocklet-aigne-hub-model.js";
|
|
4
4
|
export declare class AIGNEHubChatModel extends ChatModel {
|
|
5
5
|
options: HubChatModelOptions;
|
|
6
6
|
private client;
|
package/lib/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatModel, } from "@aigne/core";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { BlockletAIGNEHubChatModel } from "./blocklet-aigne-hub-model.js";
|
|
3
|
+
import { CliAIGNEHubChatModel } from "./cli-aigne-hub-model.js";
|
|
4
4
|
export class AIGNEHubChatModel extends ChatModel {
|
|
5
5
|
options;
|
|
6
6
|
client;
|
|
@@ -8,8 +8,8 @@ export class AIGNEHubChatModel extends ChatModel {
|
|
|
8
8
|
super();
|
|
9
9
|
this.options = options;
|
|
10
10
|
this.client = process.env.BLOCKLET_AIGNE_API_PROVIDER
|
|
11
|
-
? new
|
|
12
|
-
: new
|
|
11
|
+
? new BlockletAIGNEHubChatModel(options)
|
|
12
|
+
: new CliAIGNEHubChatModel(options);
|
|
13
13
|
}
|
|
14
14
|
process(input, options) {
|
|
15
15
|
return this.client.process(input, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/aigne-hub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "AIGNE Hub SDK for integrating with Hub AI models",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"ufo": "^1.6.1",
|
|
29
29
|
"zod": "^3.25.67",
|
|
30
|
-
"@aigne/anthropic": "^0.10.
|
|
31
|
-
"@aigne/
|
|
32
|
-
"@aigne/
|
|
33
|
-
"@aigne/deepseek": "^0.7.
|
|
34
|
-
"@aigne/gemini": "^0.8.
|
|
35
|
-
"@aigne/
|
|
36
|
-
"@aigne/
|
|
37
|
-
"@aigne/
|
|
38
|
-
"@aigne/openai": "^0.10.
|
|
39
|
-
"@aigne/
|
|
40
|
-
"@aigne/xai": "^0.7.
|
|
30
|
+
"@aigne/anthropic": "^0.10.3",
|
|
31
|
+
"@aigne/core": "^1.40.0",
|
|
32
|
+
"@aigne/default-memory": "^1.0.7",
|
|
33
|
+
"@aigne/deepseek": "^0.7.7",
|
|
34
|
+
"@aigne/gemini": "^0.8.7",
|
|
35
|
+
"@aigne/open-router": "^0.7.7",
|
|
36
|
+
"@aigne/transport": "^0.10.7",
|
|
37
|
+
"@aigne/ollama": "^0.7.7",
|
|
38
|
+
"@aigne/openai": "^0.10.7",
|
|
39
|
+
"@aigne/bedrock": "^0.8.7",
|
|
40
|
+
"@aigne/xai": "^0.7.7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/bun": "^1.2.18",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"npm-run-all": "^4.1.5",
|
|
47
47
|
"rimraf": "^6.0.1",
|
|
48
48
|
"typescript": "^5.8.3",
|
|
49
|
-
"@aigne/
|
|
50
|
-
"@aigne/
|
|
49
|
+
"@aigne/openai": "^0.10.7",
|
|
50
|
+
"@aigne/test-utils": "^0.5.15"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"lint": "tsc --noEmit",
|