File tree 1 file changed +4
-2
lines changed
autogen/agentchat/contrib/vectordb
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def create_collection(
83
83
if self .active_collection and self .active_collection .name == collection_name :
84
84
collection = self .active_collection
85
85
else :
86
- collection = self .client .get_collection (collection_name )
86
+ collection = self .client .get_collection (collection_name , embedding_function = self . embedding_function )
87
87
except ValueError :
88
88
collection = None
89
89
if collection is None :
@@ -126,7 +126,9 @@ def get_collection(self, collection_name: str = None) -> Collection:
126
126
)
127
127
else :
128
128
if not (self .active_collection and self .active_collection .name == collection_name ):
129
- self .active_collection = self .client .get_collection (collection_name )
129
+ self .active_collection = self .client .get_collection (
130
+ collection_name , embedding_function = self .embedding_function
131
+ )
130
132
return self .active_collection
131
133
132
134
def delete_collection (self , collection_name : str ) -> None :
You can’t perform that action at this time.
0 commit comments