🔧 chore(process.py): change ValueError exception to a warning log message when encountering an unknown langchain_object type (#923)

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-17 20:19:00 -03:00 committed by GitHub
commit b87502b45a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,9 +130,8 @@ def process_graph_cached(
elif isinstance(langchain_object, Document):
result = langchain_object.dict()
else:
raise ValueError(
f"Unknown langchain_object type: {type(langchain_object).__name__}"
)
logger.warning(f"Unknown langchain_object type: {type(langchain_object)}")
return result