You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@tool
def search_for_australia(query: str):
"""Searches Australia for relevant information"""
documents = query_faiss(faiss_index, query, model, texts)
llm_response_stream = co.chat_stream(
messages=[{"role": "user", "content": query}],
documents=documents,
model="command-r-plus-08-2024",
temperature=0.4
)
for event in llm_response_stream:
if event:
if event.type == "content-delta":
print(event.delta.message.content.text)
But, can print like above. And If I co.chat and return response the data the it works. But, it's not a solution, cause it's return all data at a time and langgraph_agent_executor.astream_events is waiting until get the response.
Note: I can not show the citations also.
The text was updated successfully, but these errors were encountered:
Hi @hizbul-inument Thanks for reporting this issue... Could you please try using the tool_calling_agent and see if this issue persists? There is a known mismatch between the create_react_agent implementation and Cohere integration in langgraph...
Another alternative could be to try the create_cohere_react_agent from langchain-cohere package.
Do let me know if this helps!
I am using langgraph
stream_events
and inside tools i am using cohere.I can not yeild response from tools.
But, can print like above. And If I
co.chat
and return response the data the it works. But, it's not a solution, cause it's return all data at a time andlanggraph_agent_executor.astream_events
is waiting until get the response.Note: I can not show the citations also.
The text was updated successfully, but these errors were encountered: