mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-13 15:14:50 -06:00
Support fine-tuned gemini model path to use google_search_tool
PiperOrigin-RevId: 761543344
This commit is contained in:
parent
62a543bd58
commit
1561b0f15c
@ -46,7 +46,7 @@ class GoogleSearchTool(BaseTool):
|
||||
) -> None:
|
||||
llm_request.config = llm_request.config or types.GenerateContentConfig()
|
||||
llm_request.config.tools = llm_request.config.tools or []
|
||||
if llm_request.model and llm_request.model.startswith('gemini-1'):
|
||||
if llm_request.model and 'gemini-1' in llm_request.model:
|
||||
if llm_request.config.tools:
|
||||
print(llm_request.config.tools)
|
||||
raise ValueError(
|
||||
@ -55,7 +55,7 @@ class GoogleSearchTool(BaseTool):
|
||||
llm_request.config.tools.append(
|
||||
types.Tool(google_search_retrieval=types.GoogleSearchRetrieval())
|
||||
)
|
||||
elif llm_request.model and llm_request.model.startswith('gemini-2'):
|
||||
elif llm_request.model and 'gemini-2' in llm_request.model:
|
||||
llm_request.config.tools.append(
|
||||
types.Tool(google_search=types.GoogleSearch())
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user