mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-02 09:40:26 +00:00
langchain_community.graphs: Neo4JGraph: prop min_size might be None (#23944)
When I used the Neo4JGraph enhanced_schema=True option, I ran into an error because a prop min_size of None was compared numerically with an int. The fix I applied is similar to the pattern of skipping embeddings elsewhere in the file. Co-authored-by: ccurme <chester.curme@gmail.com>
This commit is contained in:
parent
7d13a2f958
commit
ac7b71e0d7
@ -246,7 +246,7 @@ def _format_schema(schema: Dict, is_enhanced: bool) -> str:
|
||||
)
|
||||
elif prop["type"] == "LIST":
|
||||
# Skip embeddings
|
||||
if prop["min_size"] > LIST_LIMIT:
|
||||
if not prop.get("min_size") or prop["min_size"] > LIST_LIMIT:
|
||||
continue
|
||||
example = (
|
||||
f'Min Size: {prop["min_size"]}, Max Size: {prop["max_size"]}'
|
||||
|
Loading…
Reference in New Issue
Block a user