|
12 | 12 | # https://github.com/meilisearch/meilisearch-python/blob/d5a0babe50b4ce5789892845db98b30d4db72203/tests/index/test_index_search_meilisearch.py#L491-L493
|
13 | 13 | # https://github.com/meilisearch/meilisearch-python/blob/d5a0babe50b4ce5789892845db98b30d4db72203/tests/conftest.py#L132-L146
|
14 | 14 |
|
15 |
| -VECOR_NAME = "docs-embed" |
16 |
| -VECOR_DIM = 768 |
| 15 | +VECTOR_NAME = "docs-embed" |
| 16 | +VECTOR_DIM = 768 # dim of https://huggingface.co/BAAI/bge-base-en-v1.5 |
17 | 17 |
|
18 | 18 | MeilisearchFunc = Callable[..., Tuple[Client, TaskInfo]]
|
19 | 19 |
|
@@ -56,7 +56,7 @@ def wrapped_meilisearch_function(*args, **kwargs):
|
56 | 56 | @wait_for_task_completion
|
57 | 57 | def create_embedding_db(client: Client, index_name: str):
|
58 | 58 | index = client.index(index_name)
|
59 |
| - task_info = index.update_embedders({VECOR_NAME: {"source": "userProvided", "dimensions": VECOR_DIM}}) |
| 59 | + task_info = index.update_embedders({VECTOR_NAME: {"source": "userProvided", "dimensions": VECTOR_DIM}}) |
60 | 60 | return client, task_info
|
61 | 61 |
|
62 | 62 |
|
@@ -93,7 +93,7 @@ def add_embeddings_to_db(client: Client, index_name: str, embeddings):
|
93 | 93 | "source_page_url": e.source_page_url,
|
94 | 94 | "source_page_title": e.source_page_title,
|
95 | 95 | "library": e.package_name,
|
96 |
| - "_vectors": {VECOR_NAME: e.embedding}, |
| 96 | + "_vectors": {VECTOR_NAME: e.embedding}, |
97 | 97 | }
|
98 | 98 | for e in embeddings
|
99 | 99 | ]
|
|
0 commit comments