@easynet/agent-model 1.0.62 → 1.0.63
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/config/llm.yaml.example +30 -0
- package/config/model.yaml +20 -0
- package/dist/{chunk-4OLU43SH.js → chunk-CCGNXMFC.js} +4 -4
- package/dist/{chunk-YOOYQBGK.js → chunk-V5QTINFH.js} +2 -2
- package/dist/{chunk-NIFNTD6P.js → chunk-WYV2ASLG.js} +3 -3
- package/dist/{chunk-HSU6XZOI.js → chunk-XSR4TAZ7.js} +8 -8
- package/dist/cli/index.js +5 -5
- package/dist/extensions/index.js +5 -5
- package/dist/index.js +13 -13
- package/dist/langchain/index.js +2 -2
- package/package.json +3 -2
- /package/dist/{chunk-4OLU43SH.js.map → chunk-CCGNXMFC.js.map} +0 -0
- /package/dist/{chunk-YOOYQBGK.js.map → chunk-V5QTINFH.js.map} +0 -0
- /package/dist/{chunk-NIFNTD6P.js.map → chunk-WYV2ASLG.js.map} +0 -0
- /package/dist/{chunk-HSU6XZOI.js.map → chunk-XSR4TAZ7.js.map} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @easynet/agent-model 最小配置模板
|
|
2
|
+
# 放在项目根目录并命名为 llm.yaml。
|
|
3
|
+
|
|
4
|
+
llm:
|
|
5
|
+
# 默认实例 ID(建议先固定 small)
|
|
6
|
+
default: small
|
|
7
|
+
|
|
8
|
+
# small: 本地开发最常用(Ollama OpenAI 兼容接口)
|
|
9
|
+
small:
|
|
10
|
+
provider: openai
|
|
11
|
+
base_url: http://localhost:11434/v1
|
|
12
|
+
model: qwen3:0.6b
|
|
13
|
+
|
|
14
|
+
# strong: 可选强模型(云端)
|
|
15
|
+
strong:
|
|
16
|
+
provider: openai
|
|
17
|
+
base_url: ${LLM_BASE_URL}
|
|
18
|
+
model: ${LLM_MODEL}
|
|
19
|
+
|
|
20
|
+
vlm:
|
|
21
|
+
default: gemma3
|
|
22
|
+
gemma3:
|
|
23
|
+
type: image
|
|
24
|
+
provider: openai
|
|
25
|
+
base_url: https://ollama-nvidia-8g-2.easynet.world/v1
|
|
26
|
+
model: gemma3:latest
|
|
27
|
+
apiKey: not-needed
|
|
28
|
+
|
|
29
|
+
# 如果你要用 npm provider(扩展包):
|
|
30
|
+
# provider: npm:@scope/package@1.0.0#providerName
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
apiVersion: easynet.world/v1
|
|
2
|
+
kind: ModelConfig
|
|
3
|
+
metadata:
|
|
4
|
+
name: agent-model-default
|
|
5
|
+
spec:
|
|
6
|
+
llm:
|
|
7
|
+
default: small
|
|
8
|
+
small:
|
|
9
|
+
provider: openai
|
|
10
|
+
base_url: http://localhost:11434/v1
|
|
11
|
+
model: qwen3:0.6b
|
|
12
|
+
|
|
13
|
+
vlm:
|
|
14
|
+
default: gemma3
|
|
15
|
+
gemma3:
|
|
16
|
+
type: image
|
|
17
|
+
provider: openai
|
|
18
|
+
base_url: https://ollama-nvidia-8g-2.easynet.world/v1
|
|
19
|
+
model: gemma3:latest
|
|
20
|
+
apiKey: not-needed
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getChatModelFactory
|
|
3
|
-
} from "./chunk-G7MKWPEI.js";
|
|
4
1
|
import {
|
|
5
2
|
parseLlmSection
|
|
6
3
|
} from "./chunk-SPDXNDDD.js";
|
|
4
|
+
import {
|
|
5
|
+
getChatModelFactory
|
|
6
|
+
} from "./chunk-G7MKWPEI.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./chunk-PZ5AY32C.js";
|
|
@@ -162,4 +162,4 @@ export {
|
|
|
162
162
|
createChatModelFromLlmConfig,
|
|
163
163
|
langchain_exports
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
165
|
+
//# sourceMappingURL=chunk-CCGNXMFC.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveLLMExtensionPackages,
|
|
10
10
|
resolveLlmSectionWithNpm,
|
|
11
11
|
resolveNpmProvider
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XSR4TAZ7.js";
|
|
13
13
|
import {
|
|
14
14
|
NPM_PROTOCOL_PREFIX,
|
|
15
15
|
isNpmProviderSpec,
|
|
@@ -40,4 +40,4 @@ __export(extensions_exports, {
|
|
|
40
40
|
export {
|
|
41
41
|
extensions_exports
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-V5QTINFH.js.map
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./chunk-EPVJLBGC.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveLlmSectionWithNpm
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XSR4TAZ7.js";
|
|
11
11
|
import {
|
|
12
12
|
createChatModelFromLlmConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CCGNXMFC.js";
|
|
14
14
|
import {
|
|
15
15
|
parseLlmSection
|
|
16
16
|
} from "./chunk-SPDXNDDD.js";
|
|
@@ -257,4 +257,4 @@ export {
|
|
|
257
257
|
createAgentLlm,
|
|
258
258
|
cli_exports
|
|
259
259
|
};
|
|
260
|
-
//# sourceMappingURL=chunk-
|
|
260
|
+
//# sourceMappingURL=chunk-WYV2ASLG.js.map
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createChatModelFromLlmConfig
|
|
3
|
-
} from "./chunk-4OLU43SH.js";
|
|
4
|
-
import {
|
|
5
|
-
getChatModelFactory,
|
|
6
|
-
registerChatModelProvider
|
|
7
|
-
} from "./chunk-G7MKWPEI.js";
|
|
8
1
|
import {
|
|
9
2
|
ensureNpmPackageInstalled,
|
|
10
3
|
getInstalledVersion,
|
|
@@ -12,6 +5,13 @@ import {
|
|
|
12
5
|
parseNpmProviderSpec,
|
|
13
6
|
resolveLatestVersionFromRegistry
|
|
14
7
|
} from "./chunk-K3JR2N4E.js";
|
|
8
|
+
import {
|
|
9
|
+
createChatModelFromLlmConfig
|
|
10
|
+
} from "./chunk-CCGNXMFC.js";
|
|
11
|
+
import {
|
|
12
|
+
getChatModelFactory,
|
|
13
|
+
registerChatModelProvider
|
|
14
|
+
} from "./chunk-G7MKWPEI.js";
|
|
15
15
|
|
|
16
16
|
// src/extensions/loader.ts
|
|
17
17
|
import { readdirSync, readFileSync, existsSync } from "fs";
|
|
@@ -351,4 +351,4 @@ export {
|
|
|
351
351
|
resolveLlmSectionWithNpm,
|
|
352
352
|
createChatModelWithNpm
|
|
353
353
|
};
|
|
354
|
-
//# sourceMappingURL=chunk-
|
|
354
|
+
//# sourceMappingURL=chunk-XSR4TAZ7.js.map
|
package/dist/cli/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../chunk-
|
|
2
|
+
import "../chunk-WYV2ASLG.js";
|
|
3
3
|
import "../chunk-Y7POI745.js";
|
|
4
4
|
import "../chunk-EPVJLBGC.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-4OLU43SH.js";
|
|
7
|
-
import "../chunk-G7MKWPEI.js";
|
|
8
|
-
import "../chunk-SPDXNDDD.js";
|
|
5
|
+
import "../chunk-XSR4TAZ7.js";
|
|
9
6
|
import "../chunk-K3JR2N4E.js";
|
|
7
|
+
import "../chunk-CCGNXMFC.js";
|
|
8
|
+
import "../chunk-SPDXNDDD.js";
|
|
9
|
+
import "../chunk-G7MKWPEI.js";
|
|
10
10
|
import "../chunk-PZ5AY32C.js";
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
package/dist/extensions/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-V5QTINFH.js";
|
|
2
2
|
import {
|
|
3
3
|
createChatModelWithNpm,
|
|
4
4
|
discoverLLMExtensions,
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveLLMExtensionPackages,
|
|
11
11
|
resolveLlmSectionWithNpm,
|
|
12
12
|
resolveNpmProvider
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-4OLU43SH.js";
|
|
15
|
-
import "../chunk-G7MKWPEI.js";
|
|
16
|
-
import "../chunk-SPDXNDDD.js";
|
|
13
|
+
} from "../chunk-XSR4TAZ7.js";
|
|
17
14
|
import {
|
|
18
15
|
NPM_PROTOCOL_PREFIX,
|
|
19
16
|
isNpmProviderSpec,
|
|
20
17
|
parseNpmProviderSpec
|
|
21
18
|
} from "../chunk-K3JR2N4E.js";
|
|
19
|
+
import "../chunk-CCGNXMFC.js";
|
|
20
|
+
import "../chunk-SPDXNDDD.js";
|
|
21
|
+
import "../chunk-G7MKWPEI.js";
|
|
22
22
|
import "../chunk-PZ5AY32C.js";
|
|
23
23
|
export {
|
|
24
24
|
NPM_PROTOCOL_PREFIX,
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
registry_exports
|
|
3
|
-
} from "./chunk-HCU4AWIV.js";
|
|
4
1
|
import {
|
|
5
2
|
cli_exports,
|
|
6
3
|
createAgentLlm
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WYV2ASLG.js";
|
|
8
5
|
import {
|
|
9
6
|
config_exports,
|
|
10
7
|
normalizeAgentModelConfigRef
|
|
@@ -18,19 +15,18 @@ import {
|
|
|
18
15
|
} from "./chunk-EPVJLBGC.js";
|
|
19
16
|
import {
|
|
20
17
|
extensions_exports
|
|
21
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-V5QTINFH.js";
|
|
22
19
|
import {
|
|
23
20
|
resolveLlmSectionWithNpm
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XSR4TAZ7.js";
|
|
22
|
+
import {
|
|
23
|
+
npm_exports
|
|
24
|
+
} from "./chunk-K3JR2N4E.js";
|
|
25
25
|
import {
|
|
26
26
|
applyToolChoiceAuto,
|
|
27
27
|
createChatModelFromLlmConfig,
|
|
28
28
|
langchain_exports
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import {
|
|
31
|
-
getChatModelFactory,
|
|
32
|
-
registerChatModelProvider
|
|
33
|
-
} from "./chunk-G7MKWPEI.js";
|
|
29
|
+
} from "./chunk-CCGNXMFC.js";
|
|
34
30
|
import {
|
|
35
31
|
createModelHub,
|
|
36
32
|
model_exports,
|
|
@@ -40,8 +36,12 @@ import {
|
|
|
40
36
|
parseLlmSection
|
|
41
37
|
} from "./chunk-SPDXNDDD.js";
|
|
42
38
|
import {
|
|
43
|
-
|
|
44
|
-
} from "./chunk-
|
|
39
|
+
registry_exports
|
|
40
|
+
} from "./chunk-HCU4AWIV.js";
|
|
41
|
+
import {
|
|
42
|
+
getChatModelFactory,
|
|
43
|
+
registerChatModelProvider
|
|
44
|
+
} from "./chunk-G7MKWPEI.js";
|
|
45
45
|
import "./chunk-PZ5AY32C.js";
|
|
46
46
|
|
|
47
47
|
// src/api/get-default-llm-config.ts
|
package/dist/langchain/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyToolChoiceAuto,
|
|
3
3
|
createChatModelFromLlmConfig
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-G7MKWPEI.js";
|
|
4
|
+
} from "../chunk-CCGNXMFC.js";
|
|
6
5
|
import "../chunk-SPDXNDDD.js";
|
|
6
|
+
import "../chunk-G7MKWPEI.js";
|
|
7
7
|
import "../chunk-PZ5AY32C.js";
|
|
8
8
|
export {
|
|
9
9
|
applyToolChoiceAuto,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easynet/agent-model",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.63",
|
|
4
4
|
"description": "Agent LLM: multi-provider, multi-model, simple chat/image API. Consumes agent.yaml llm section.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
"vitest": "^2.1.8"
|
|
82
82
|
},
|
|
83
83
|
"files": [
|
|
84
|
-
"dist"
|
|
84
|
+
"dist",
|
|
85
|
+
"config"
|
|
85
86
|
],
|
|
86
87
|
"publishConfig": {
|
|
87
88
|
"access": "public",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|