kraken-ai 0.0.7 → 0.0.8
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.
|
@@ -107,7 +107,7 @@ var buildRequestConfig = (params) => {
|
|
|
107
107
|
if (params.maxOutputTokens != null) generateConfig.maxOutputTokens = params.maxOutputTokens;
|
|
108
108
|
if (params.responseSchema) {
|
|
109
109
|
generateConfig.responseMimeType = "application/json";
|
|
110
|
-
generateConfig.
|
|
110
|
+
generateConfig.responseJsonSchema = params.responseSchema;
|
|
111
111
|
}
|
|
112
112
|
if (tools) generateConfig.tools = tools;
|
|
113
113
|
return generateConfig;
|
package/dist/index.cjs
CHANGED
|
@@ -204,7 +204,7 @@ var init_google = __esm({
|
|
|
204
204
|
if (params.maxOutputTokens != null) generateConfig.maxOutputTokens = params.maxOutputTokens;
|
|
205
205
|
if (params.responseSchema) {
|
|
206
206
|
generateConfig.responseMimeType = "application/json";
|
|
207
|
-
generateConfig.
|
|
207
|
+
generateConfig.responseJsonSchema = params.responseSchema;
|
|
208
208
|
}
|
|
209
209
|
if (tools) generateConfig.tools = tools;
|
|
210
210
|
return generateConfig;
|
|
@@ -697,7 +697,10 @@ var createRunner = (config2) => {
|
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
|
|
700
|
+
if (!foundTool) {
|
|
701
|
+
throw new ToolError(`Unknown tool: ${tc.name}`, tc.name);
|
|
702
|
+
}
|
|
703
|
+
const executeFn = () => foundTool.execute(tc.args);
|
|
701
704
|
approved.push({ tc, executeFn });
|
|
702
705
|
}
|
|
703
706
|
if (!approved.length) continue;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
google
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M2U6HNWW.js";
|
|
4
4
|
import {
|
|
5
5
|
openai
|
|
6
6
|
} from "./chunk-D2AU5FGJ.js";
|
|
@@ -40,7 +40,7 @@ var createLazyModel = (provider, modelId) => {
|
|
|
40
40
|
const ensureResolved = async () => {
|
|
41
41
|
if (resolvedModel) return resolvedModel;
|
|
42
42
|
if (provider === "google") {
|
|
43
|
-
const { google: google2 } = await import("./google-
|
|
43
|
+
const { google: google2 } = await import("./google-3DFIROPW.js");
|
|
44
44
|
resolvedModel = google2(modelId);
|
|
45
45
|
} else if (provider === "openai") {
|
|
46
46
|
const { openai: openai2 } = await import("./openai-STUANOLN.js");
|
|
@@ -379,7 +379,10 @@ var createRunner = (config2) => {
|
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
|
|
382
|
+
if (!foundTool) {
|
|
383
|
+
throw new ToolError(`Unknown tool: ${tc.name}`, tc.name);
|
|
384
|
+
}
|
|
385
|
+
const executeFn = () => foundTool.execute(tc.args);
|
|
383
386
|
approved.push({ tc, executeFn });
|
|
384
387
|
}
|
|
385
388
|
if (!approved.length) continue;
|