Skip to content
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 AttributeError raised on retriever #187

Merged
merged 4 commits into from
Nov 19, 2024
Merged

Fix AttributeError raised on retriever #187

merged 4 commits into from
Nov 19, 2024

Conversation

pamella
Copy link
Collaborator

@pamella pamella commented Nov 19, 2024

Description


An AttributeError was happening within the retriever method during execution.

The issue happened at the line:

docs = retriever.invoke(
    {"input": input_message, "history": messages_to_summarize}
)

because a string was expected in for the input and not a HumanMessage. See langchain's retriever.invoke: https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/retrievers.py#L201

image

Steps to test

Screencast.from.19-11-2024.11.10.31.webm

@pamella pamella marked this pull request as ready for review November 19, 2024 18:30
@pamella pamella requested a review from fjsj November 19, 2024 18:31
@pamella pamella added the bug Something isn't working label Nov 19, 2024
@pamella pamella merged commit 2e5aff2 into main Nov 19, 2024
18 checks passed
@pamella pamella deleted the fix/rag-example branch November 19, 2024 18:45
@pamella pamella changed the title Fix AttributeError raised on AIAssistant.retriever Fix AttributeError raised on retriever Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants