The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
fixed Bug in PreFilter of AzureCosmosDBNoSqlVectorSearch (#29613)
Mohammad Anashf849305a56d9
diff --git a/libs/community/langchain_community/vectorstores/azure_cosmos_db_no_sql.py b/libs/community/langchain_community/vectorstores/azure_cosmos_db_no_sql.pyindex 721994f81a..90b3deb6ab 100644--- a/libs/community/langchain_community/vectorstores/azure_cosmos_db_no_sql.py+++ b/libs/community/langchain_community/vectorstores/azure_cosmos_db_no_sql.py@@ -789,6 +789,13 @@ class AzureCosmosDBNoSqlVectorSearch(VectorStore):elif isinstance(condition.value, list):# e.g., for IN clausesvalue = f"({', '.join(map(str, condition.value))})"+ elif isinstance(condition.value, (int, float, bool)):+ value = str(condition.value)+ elif condition.value is None:+ value = "NULL"+ else:+ raise ValueError(f"Unsupported value type: {type(condition.value)}")+clauses.append(f"c.{condition.property} {sql_operator} {value}")return f""" WHERE {' {} '.format(sql_logical_operator).join(clauses)}""".strip()