@blaxel/langgraph 0.2.59-preview.42 → 0.2.59
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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/model.js +9 -9
- package/dist/cjs/types/tools.d.ts +2 -2
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/model.js +9 -9
- package/package.json +2 -2
package/dist/cjs/model.js
CHANGED
|
@@ -57,12 +57,12 @@ const blModel = async (model, options) => {
|
|
|
57
57
|
throw new Error(`Model ${model} not found`);
|
|
58
58
|
}
|
|
59
59
|
await (0, core_1.authenticate)();
|
|
60
|
-
const type = modelData
|
|
60
|
+
const type = modelData.spec.runtime?.type || "openai";
|
|
61
61
|
try {
|
|
62
62
|
if (type === "gemini") {
|
|
63
63
|
return new google_genai_js_1.AuthenticatedChatGoogleGenerativeAI({
|
|
64
64
|
apiKey: core_1.settings.token,
|
|
65
|
-
model: modelData
|
|
65
|
+
model: modelData.spec.runtime?.model,
|
|
66
66
|
baseUrl: url,
|
|
67
67
|
customHeaders: core_1.settings.headers,
|
|
68
68
|
...options,
|
|
@@ -71,7 +71,7 @@ const blModel = async (model, options) => {
|
|
|
71
71
|
else if (type === "mistral") {
|
|
72
72
|
return new openai_1.ChatOpenAI({
|
|
73
73
|
apiKey: "replaced",
|
|
74
|
-
model: modelData
|
|
74
|
+
model: modelData.spec.runtime?.model,
|
|
75
75
|
configuration: {
|
|
76
76
|
baseURL: `${url}/v1`,
|
|
77
77
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -88,7 +88,7 @@ const blModel = async (model, options) => {
|
|
|
88
88
|
// @ts-ignore Error in langgraph
|
|
89
89
|
return new cohere_1.ChatCohere({
|
|
90
90
|
apiKey: "replaced",
|
|
91
|
-
model: modelData
|
|
91
|
+
model: modelData.spec.runtime?.model,
|
|
92
92
|
client: new cohere_ai_1.CohereClient({
|
|
93
93
|
token: "replaced",
|
|
94
94
|
environment: url,
|
|
@@ -101,7 +101,7 @@ const blModel = async (model, options) => {
|
|
|
101
101
|
// @ts-ignore Error in langgraph
|
|
102
102
|
return new deepseek_1.ChatDeepSeek({
|
|
103
103
|
apiKey: "replaced",
|
|
104
|
-
model: modelData
|
|
104
|
+
model: modelData.spec.runtime?.model,
|
|
105
105
|
configuration: {
|
|
106
106
|
baseURL: `${url}/v1`,
|
|
107
107
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -114,7 +114,7 @@ const blModel = async (model, options) => {
|
|
|
114
114
|
// @ts-ignore Error in langgraph
|
|
115
115
|
return new anthropic_1.ChatAnthropic({
|
|
116
116
|
anthropicApiUrl: url,
|
|
117
|
-
model: modelData
|
|
117
|
+
model: modelData.spec.runtime?.model,
|
|
118
118
|
apiKey: "replaced",
|
|
119
119
|
clientOptions: {
|
|
120
120
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -131,7 +131,7 @@ const blModel = async (model, options) => {
|
|
|
131
131
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
132
132
|
fetch: authenticatedFetch(),
|
|
133
133
|
},
|
|
134
|
-
model: modelData
|
|
134
|
+
model: modelData.spec.runtime?.model,
|
|
135
135
|
...options,
|
|
136
136
|
});
|
|
137
137
|
}
|
|
@@ -139,7 +139,7 @@ const blModel = async (model, options) => {
|
|
|
139
139
|
// We don't use ChatCerebras because there is a problem with apiKey headers
|
|
140
140
|
return new openai_1.ChatOpenAI({
|
|
141
141
|
apiKey: "replaced",
|
|
142
|
-
model: modelData
|
|
142
|
+
model: modelData.spec.runtime?.model,
|
|
143
143
|
configuration: {
|
|
144
144
|
baseURL: `${url}/v1`,
|
|
145
145
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -150,7 +150,7 @@ const blModel = async (model, options) => {
|
|
|
150
150
|
}
|
|
151
151
|
return new openai_1.ChatOpenAI({
|
|
152
152
|
apiKey: "replaced",
|
|
153
|
-
model: modelData
|
|
153
|
+
model: modelData.spec.runtime?.model,
|
|
154
154
|
configuration: {
|
|
155
155
|
baseURL: `${url}/v1`,
|
|
156
156
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -5,11 +5,11 @@ export declare function blTool(name: string, options?: ToolOptions | number): Pr
|
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
}>, unknown, {
|
|
7
7
|
[x: string]: any;
|
|
8
|
-
}, unknown>[]>;
|
|
8
|
+
}, unknown, string>[]>;
|
|
9
9
|
export declare function blTools(names: string[], ms?: number): Promise<import("@langchain/core/tools").DynamicStructuredTool<import("zod").ZodObject<any, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
|
|
10
10
|
[x: string]: any;
|
|
11
11
|
}, {
|
|
12
12
|
[x: string]: any;
|
|
13
13
|
}>, unknown, {
|
|
14
14
|
[x: string]: any;
|
|
15
|
-
}, unknown>[]>;
|
|
15
|
+
}, unknown, string>[]>;
|