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
Fix Cohere retriever #19771
Fix Cohere retriever #19771
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
query: str, | ||
*, | ||
run_manager: CallbackManagerForRetrieverRun, | ||
documents: Optional[List[Dict[str, str]]] = None, |
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.
ooc why are we passing documents into the retriever?
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.
It's being passed in through **kwargs
either way (example here at the bottom). I am pulling it out here to make a check for the connectors. The Cohere SDK throws an error when both a connector and documents are specified, so passing None
for connectors if documents are specified.
* Replace `source_documents` with `documents` * Pass `documents` as a named arg vs keyword * Make `parsed_docs` more robust * Fix edge case of doc page_content being `None`
* Replace `source_documents` with `documents` * Pass `documents` as a named arg vs keyword * Make `parsed_docs` more robust * Fix edge case of doc page_content being `None`
source_documents
withdocuments
documents
as a named arg vs keywordparsed_docs
more robustNone