mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-05 12:48:12 +00:00
community[patch]: the syntax error for Redis generated query (#17717)
To fix the reported error: https://github.com/langchain-ai/langchain/discussions/17397
This commit is contained in:
parent
43e3244573
commit
08fa38d56d
@ -1118,7 +1118,7 @@ class Redis(VectorStore):
|
|||||||
base_query = f"@{vector_key}:[VECTOR_RANGE $distance_threshold $vector]"
|
base_query = f"@{vector_key}:[VECTOR_RANGE $distance_threshold $vector]"
|
||||||
|
|
||||||
if filter:
|
if filter:
|
||||||
base_query = "(" + base_query + " " + str(filter) + ")"
|
base_query = str(filter) + " " + base_query
|
||||||
|
|
||||||
query_string = base_query + "=>{$yield_distance_as: distance}"
|
query_string = base_query + "=>{$yield_distance_as: distance}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user