mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-16 12:12:56 -06:00
feat: expose more config of VertexAiSearchTool from latest Google GenAI SDK
for fixing: https://github.com/google/adk-python/issues/955 PiperOrigin-RevId: 764568728
This commit is contained in:
parent
b92e068155
commit
2b5c89b3a9
@ -40,6 +40,8 @@ class VertexAiSearchTool(BaseTool):
|
|||||||
*,
|
*,
|
||||||
data_store_id: Optional[str] = None,
|
data_store_id: Optional[str] = None,
|
||||||
search_engine_id: Optional[str] = None,
|
search_engine_id: Optional[str] = None,
|
||||||
|
filter: Optional[str] = None,
|
||||||
|
max_results: Optional[int] = None,
|
||||||
):
|
):
|
||||||
"""Initializes the Vertex AI Search tool.
|
"""Initializes the Vertex AI Search tool.
|
||||||
|
|
||||||
@ -64,6 +66,8 @@ class VertexAiSearchTool(BaseTool):
|
|||||||
)
|
)
|
||||||
self.data_store_id = data_store_id
|
self.data_store_id = data_store_id
|
||||||
self.search_engine_id = search_engine_id
|
self.search_engine_id = search_engine_id
|
||||||
|
self.filter = filter
|
||||||
|
self.max_results = max_results
|
||||||
|
|
||||||
@override
|
@override
|
||||||
async def process_llm_request(
|
async def process_llm_request(
|
||||||
@ -84,7 +88,10 @@ class VertexAiSearchTool(BaseTool):
|
|||||||
types.Tool(
|
types.Tool(
|
||||||
retrieval=types.Retrieval(
|
retrieval=types.Retrieval(
|
||||||
vertex_ai_search=types.VertexAISearch(
|
vertex_ai_search=types.VertexAISearch(
|
||||||
datastore=self.data_store_id, engine=self.search_engine_id
|
datastore=self.data_store_id,
|
||||||
|
engine=self.search_engine_id,
|
||||||
|
filter=self.filter,
|
||||||
|
max_results=self.max_results,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user