The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Update azuresearch.py (#25577)
Jabir12e490ea562f
diff --git a/libs/community/langchain_community/vectorstores/azuresearch.py b/libs/community/langchain_community/vectorstores/azuresearch.pyindex 5d7a6fc8ed..9154f44933 100644--- a/libs/community/langchain_community/vectorstores/azuresearch.py+++ b/libs/community/langchain_community/vectorstores/azuresearch.py@@ -1735,7 +1735,11 @@ def _reorder_results_with_maximal_marginal_relevance(def _result_to_document(result: Dict) -> Document:return Document(page_content=result.pop(FIELDS_CONTENT),- metadata=json.loads(result[FIELDS_METADATA])+ metadata=(+ result[FIELDS_METADATA]+ if isinstance(result[FIELDS_METADATA], dict)+ else json.loads(result[FIELDS_METADATA])+ )if FIELDS_METADATA in resultelse {key: value for key, value in result.items() if key != FIELDS_CONTENT_VECTOR