-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent search feature #3749
Agent search feature #3749
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
e00a6d0
to
fa70770
Compare
tool_call_chunk = AIMessageChunk(content="") | ||
# for response in response_handler_manager.handle_llm_response(stream): | ||
|
||
if final_search_results and displayed_search_results: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuhongsun96 we're using a CitationResponseHandler here, but using other code to handle agent search citations. A little unfortunate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably use the same style of objects at least, even if there is more than one of them for each case.
answer_piece = response.content | ||
if not isinstance(answer_piece, str): | ||
# TODO: handle non-string content | ||
logger.warning(f"Received non-string content: {type(answer_piece)}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuhongsun96 in several places we just assume the output is a string, let us know if you want any specific handling of unexpected types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're confident that in all our flows it's a string, you can just assert it
) | ||
) | ||
|
||
quality_str = merge_message_runs(response, chunk_separator="")[0].content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuhongsun96 Is this best practice for merging a list of streamed messages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk, I've never used this LangChain util. I mean it seems fine, you seem to be using it for the intended purpose.
941f4c0
to
b928201
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agent Search Beta ready!
Description
https://linear.app/danswer/issue/DAN-1405/agentic-search
How Has This Been Tested?
Unit tested and extensively tested in the UI. Integration tests should follow at some point.
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.