File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -50,18 +50,18 @@ def save(obj):
5050 serialized ["type" ] = "constructor"
5151 serialized ["_type" ] = OpenSearchVectorDBSerializer .type ()
5252 kwargs = {}
53- for key , val in obj .__dict__ .items ():
54- if key == "client" :
55- if isinstance (val , OpenSearch ):
56- client_info = val .transport .hosts [0 ]
53+ for component_name , component in obj .__dict__ .items ():
54+ if component_name == "client" :
55+ if isinstance (component , OpenSearch ):
56+ client_info = component .transport .hosts [0 ]
5757 opensearch_url = (
5858 f"https://{ client_info ['host' ]} :{ client_info ['port' ]} "
5959 )
6060 kwargs .update ({"opensearch_url" : opensearch_url })
6161 else :
6262 raise NotImplementedError ("Only support OpenSearch client." )
6363 continue
64- kwargs [key ] = dump (val )
64+ kwargs [component_name ] = dump (component )
6565 serialized ["kwargs" ] = kwargs
6666 return serialized
6767
You can’t perform that action at this time.
0 commit comments