|
48 | 48 | DEFAULT_INSERT_BATCH_SIZE = 100 |
49 | 49 |
|
50 | 50 |
|
| 51 | +# TODO: fold the autoembedding indexes into MongoDBAtlasVectorSearch |
| 52 | +# Add flag containing type: e.g. self.embedding_type in ["manual", "auto"], autoembedding (bool) |
| 53 | +# - OR add model (str) param and infer: e.g. if embedding is not None: self.embedding_type = "manual" |
| 54 | +# - assert not embedding and model |
51 | 55 | class MongoDBAtlasVectorSearch(VectorStore): |
52 | 56 | """MongoDB Atlas vector store integration. |
53 | 57 |
|
@@ -204,7 +208,7 @@ class MongoDBAtlasVectorSearch(VectorStore): |
204 | 208 | def __init__( |
205 | 209 | self, |
206 | 210 | collection: Collection[Dict[str, Any]], |
207 | | - embedding: Embeddings, |
| 211 | + embedding: Embeddings = None, |
208 | 212 | index_name: str = "vector_index", |
209 | 213 | text_key: Union[str, List[str]] = "text", |
210 | 214 | embedding_key: str = "embedding", |
@@ -1061,7 +1065,7 @@ def similarity_search_with_score( |
1061 | 1065 | def from_texts( |
1062 | 1066 | cls, |
1063 | 1067 | texts: List[str], |
1064 | | - embedding: Embeddings = VoyageAIEmbeddings(model="voyage-3-large"), |
| 1068 | + embedding: Embeddings = None, # VoyageAIEmbeddings(model="voyage-3-large"), |
1065 | 1069 | metadatas: Optional[List[Dict]] = None, |
1066 | 1070 | collection: Optional[Collection] = None, |
1067 | 1071 | ids: Optional[List[str]] = None, |
|
0 commit comments