@paean-ai/adk 0.2.26 → 0.2.28
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/agents/llm_agent.js +6 -0
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/models/google_llm.js +17 -0
- package/dist/cjs/utils/variant_utils.js +1 -1
- package/dist/esm/agents/llm_agent.js +6 -0
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/models/google_llm.js +17 -0
- package/dist/esm/utils/variant_utils.js +1 -1
- package/dist/web/agents/llm_agent.js +6 -0
- package/dist/web/index.js +1 -1
- package/dist/web/index.js.map +3 -3
- package/dist/web/models/google_llm.js +17 -0
- package/dist/web/utils/variant_utils.js +1 -1
- package/package.json +1 -1
|
@@ -495,6 +495,7 @@ class Gemini extends BaseLlm {
|
|
|
495
495
|
return new GeminiLlmConnection(liveSession);
|
|
496
496
|
}
|
|
497
497
|
preprocessRequest(llmRequest) {
|
|
498
|
+
var _a;
|
|
498
499
|
if (this.apiBackend === GoogleLLMVariant.GEMINI_API) {
|
|
499
500
|
if (llmRequest.config) {
|
|
500
501
|
llmRequest.config.labels = void 0;
|
|
@@ -508,6 +509,22 @@ class Gemini extends BaseLlm {
|
|
|
508
509
|
}
|
|
509
510
|
}
|
|
510
511
|
}
|
|
512
|
+
if (((_a = llmRequest.config) == null ? void 0 : _a.tools) && llmRequest.config.tools.length > 1) {
|
|
513
|
+
const hasBuiltInSearch = llmRequest.config.tools.some(
|
|
514
|
+
(t) => "googleSearch" in t || "googleSearchRetrieval" in t
|
|
515
|
+
);
|
|
516
|
+
const hasFunctionDeclarations = llmRequest.config.tools.some(
|
|
517
|
+
(t) => "functionDeclarations" in t
|
|
518
|
+
);
|
|
519
|
+
if (hasBuiltInSearch && hasFunctionDeclarations) {
|
|
520
|
+
logger.warn(
|
|
521
|
+
"Gemini API (AI Studio) does not support combining built-in search tools with custom function declarations. Removing built-in search tool from this request."
|
|
522
|
+
);
|
|
523
|
+
llmRequest.config.tools = llmRequest.config.tools.filter(
|
|
524
|
+
(t) => !("googleSearch" in t) && !("googleSearchRetrieval" in t)
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
511
528
|
}
|
|
512
529
|
}
|
|
513
530
|
}
|
|
@@ -16,7 +16,7 @@ function getBooleanEnvVar(envVar) {
|
|
|
16
16
|
return false;
|
|
17
17
|
}
|
|
18
18
|
const envVarValue = (process.env[envVar] || "").toLowerCase();
|
|
19
|
-
return ["true", "1"].includes(
|
|
19
|
+
return ["true", "1"].includes(envVarValue);
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
22
22
|
GoogleLLMVariant,
|