refactor: Update SelfQueryRetriever to handle non-string query types
This commit is contained in:
parent
f72eda81b5
commit
5be733e68c
1 changed files with 2 additions and 1 deletions
|
|
@ -60,7 +60,8 @@ class SelfQueryRetrieverComponent(CustomComponent):
|
|||
input_text = query.text
|
||||
elif isinstance(query, str):
|
||||
input_text = query
|
||||
else:
|
||||
|
||||
if not isinstance(query, str):
|
||||
raise ValueError(f"Query type {type(query)} not supported.")
|
||||
documents = self_query_retriever.invoke(input=input_text)
|
||||
data = [Data.from_document(document) for document in documents]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue