-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
Bug Description
I tried the google reranker nodeprocessor and it works fine in my tests and in my jupyter notebook.
On the contrary, it does not work in production. I have a react agent with a query engine tool with the reranker and the virtual assistant continues reply: I’m sorry, but due to technical issues with the tools I have available, I’m unable to answer your question. Please try asking something else.
The problem is with the asyncronous threds when calling the _apostprocess_nodes() function which uses _async_client = discoveryengine.RankServiceAsyncClient(). In support of this, when I remove the _apostprocess_nodes() function, and use the default:
async def _apostprocess_nodes(
self,
nodes: List[NodeWithScore],
query_bundle: Optional[QueryBundle] = None,
) -> List[NodeWithScore]:
"""Postprocess nodes (async)."""
return await asyncio.to_thread(self._postprocess_nodes, nodes, query_bundle)all works just fine.
Version
0.14.15
Steps to Reproduce
You should deploy somewhere your virtual assistant which initialize a react agent and a query engine with gemini with the GoogleGenAI() class using VertexAIConfig().