@blocklet/pages-kit-agents 0.5.25 → 0.5.27
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/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/agent-utils.d.ts +3 -3
- package/lib/cjs/utils/agent-utils.js +10 -10
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/agent-utils.d.ts +3 -3
- package/lib/esm/utils/agent-utils.js +6 -6
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/utils/agent-utils.d.ts +3 -3
- package/package.json +7 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OpenAIChatModel } from '@aigne/
|
|
3
|
-
export declare function getModel(modelName?: string): OpenAIChatModel |
|
|
1
|
+
import { AnthropicChatModel } from '@aigne/anthropic';
|
|
2
|
+
import { OpenAIChatModel } from '@aigne/openai';
|
|
3
|
+
export declare function getModel(modelName?: string): OpenAIChatModel | AnthropicChatModel | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DeepSeekChatModel } from '@aigne/
|
|
3
|
-
import { GeminiChatModel } from '@aigne/
|
|
4
|
-
import { OpenAIChatModel } from '@aigne/
|
|
5
|
-
import { XAIChatModel } from '@aigne/
|
|
1
|
+
import { AnthropicChatModel } from '@aigne/anthropic';
|
|
2
|
+
import { DeepSeekChatModel } from '@aigne/deepseek';
|
|
3
|
+
import { GeminiChatModel } from '@aigne/gemini';
|
|
4
|
+
import { OpenAIChatModel } from '@aigne/openai';
|
|
5
|
+
import { XAIChatModel } from '@aigne/xai';
|
|
6
6
|
import assert from 'node:assert';
|
|
7
7
|
const { OPENAI_API_KEY, GEMINI_API_KEY, CLAUDE_API_KEY, XAI_API_KEY, DEEPSEEK_API_KEY } = process.env;
|
|
8
8
|
export function getModel(modelName = 'openai') {
|
|
@@ -27,7 +27,7 @@ export function getModel(modelName = 'openai') {
|
|
|
27
27
|
}
|
|
28
28
|
if (modelName?.includes('claude')) {
|
|
29
29
|
assert(CLAUDE_API_KEY, 'Please set the CLAUDE_API_KEY environment variable');
|
|
30
|
-
const model = new
|
|
30
|
+
const model = new AnthropicChatModel({
|
|
31
31
|
apiKey: CLAUDE_API_KEY,
|
|
32
32
|
model: modelName,
|
|
33
33
|
modelOptions: {
|