Skip to content

Commit

Permalink
fix(api): add missing user_agent argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-W committed Nov 22, 2023
1 parent 684ba92 commit 8d52268
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/ask_astro/chains/answer_question.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ def _get_docs(
):
docs = super()._get_docs(question=question, inputs=inputs, run_manager=run_manager)
if CohereConfig.cohere_api_key:
# compressor = CohereRerank(top_n=CohereConfig.top_n)
compressor = CohereRerank()
compressor = CohereRerank(top_n=CohereConfig.top_n, user_agent="langchain")
return compressor.compress_documents(docs, question)
return docs

Expand Down

0 comments on commit 8d52268

Please sign in to comment.