Error when using VespaRetriever with Langchain #10042
-
Hi everyone, I've done everything exactly as the tutorial says and I have such error:
So, I've read langchain documentation langchain.retrievers.vespa_retriever.VespaRetriever — 🦜🔗 LangChain 0.0.266 and I am passing keyword arguments that are required by VespaRetriever:
And such error appeared:
Could anyone help me solve this? Could this be a bug? Calling update_forward_refs() does not help. I am using Python 3.10.11, pyvespa 0.34.0 and langchain 0.0.250 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
🤖 Hello, From the context provided, it seems like there might be a discrepancy between the version of LangChain you're using (0.0.250) and the latest version (0.0.277). The required arguments for the Here is the relevant code: @classmethod
def from_params(
cls,
url: str,
content_field: str,
*,
k: Optional[int] = None,
metadata_fields: Union[Sequence[str], Literal["*"]] = (),
sources: Union[Sequence[str], Literal["*"], None] = None,
_filter: Optional[str] = None,
yql: Optional[str] = None,
**kwargs: Any,
) -> VespaRetriever:
"""Instantiate retriever from params.
Args:
url (str): Vespa app URL.
content_field (str): Field in results to return as Document page_content.
...
Returns:
VespaRetriever: Instantiated VespaRetriever.
"""
...
return cls(
app=app,
body=body,
content_field=content_field,
metadata_fields=metadata_fields,
) In this method, Unfortunately, I couldn't find any specific changes made to the As for the I would recommend trying to update your LangChain version to the latest one (0.0.277) and see if the issue persists. If it does, please provide more details about how you're instantiating the I hope this helps! Let me know if you have any other questions. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
create a new env and install the older version pip install --upgrade langchain==0.0.224, it works for me