mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-30 15:04:16 -07:00
Co-authored-by: Yuna Seol <yunaseol@google.com>
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
logWebFetchFallbackAttempt,
|
||||
WebFetchFallbackAttemptEvent,
|
||||
} from '../telemetry/index.js';
|
||||
import { LlmRole } from '../telemetry/llmRole.js';
|
||||
import { WEB_FETCH_TOOL_NAME } from './tool-names.js';
|
||||
import { debugLogger } from '../utils/debugLogger.js';
|
||||
import { retryWithBackoff } from '../utils/retry.js';
|
||||
@@ -189,6 +190,7 @@ ${textContent}
|
||||
{ model: 'web-fetch-fallback' },
|
||||
[{ role: 'user', parts: [{ text: fallbackPrompt }] }],
|
||||
signal,
|
||||
LlmRole.UTILITY_TOOL,
|
||||
);
|
||||
const resultText = getResponseText(result) || '';
|
||||
return {
|
||||
@@ -278,6 +280,7 @@ ${textContent}
|
||||
{ model: 'web-fetch' },
|
||||
[{ role: 'user', parts: [{ text: userPrompt }] }],
|
||||
signal, // Pass signal
|
||||
LlmRole.UTILITY_TOOL,
|
||||
);
|
||||
|
||||
debugLogger.debug(
|
||||
|
||||
@@ -17,6 +17,7 @@ import { getResponseText } from '../utils/partUtils.js';
|
||||
import { debugLogger } from '../utils/debugLogger.js';
|
||||
import { WEB_SEARCH_DEFINITION } from './definitions/coreTools.js';
|
||||
import { resolveToolDeclaration } from './definitions/resolver.js';
|
||||
import { LlmRole } from '../telemetry/llmRole.js';
|
||||
|
||||
interface GroundingChunkWeb {
|
||||
uri?: string;
|
||||
@@ -86,6 +87,7 @@ class WebSearchToolInvocation extends BaseToolInvocation<
|
||||
{ model: 'web-search' },
|
||||
[{ role: 'user', parts: [{ text: this.params.query }] }],
|
||||
signal,
|
||||
LlmRole.UTILITY_TOOL,
|
||||
);
|
||||
|
||||
const responseText = getResponseText(response);
|
||||
|
||||
Reference in New Issue
Block a user