File tree 1 file changed +7
-9
lines changed
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 16
16
from chromadb .serde import BaseModelJSONSerializable
17
17
from chromadb .api .collection_configuration import (
18
18
CollectionConfiguration ,
19
- HNSWConfiguration ,
20
- SpannConfiguration ,
21
19
collection_configuration_to_json ,
22
20
load_collection_configuration_from_json ,
23
21
)
@@ -155,8 +153,8 @@ def get_configuration(self) -> CollectionConfiguration:
155
153
stacklevel = 2 ,
156
154
)
157
155
return CollectionConfiguration (
158
- hnsw = HNSWConfiguration () ,
159
- spann = SpannConfiguration () ,
156
+ hnsw = None ,
157
+ spann = None ,
160
158
embedding_function = None ,
161
159
)
162
160
@@ -175,11 +173,11 @@ def get_model_fields(self) -> Dict[Any, Any]:
175
173
@override
176
174
def from_json (cls , json_map : Dict [str , Any ]) -> Self :
177
175
"""Deserializes a Collection object from JSON"""
178
- configuration : CollectionConfiguration = {
179
- " hnsw" : {} ,
180
- " spann" : {} ,
181
- " embedding_function" : None ,
182
- }
176
+ configuration = CollectionConfiguration (
177
+ hnsw = None ,
178
+ spann = None ,
179
+ embedding_function = None ,
180
+ )
183
181
try :
184
182
configuration_json = json_map .get ("configuration_json" , None )
185
183
configuration = load_collection_configuration_from_json (configuration_json )
You can’t perform that action at this time.
0 commit comments