Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mishig25 committed Jul 2, 2024
1 parent 181d6e9 commit 7cc64e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/doc_builder/meilisearch_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# https://github.com/meilisearch/meilisearch-python/blob/d5a0babe50b4ce5789892845db98b30d4db72203/tests/index/test_index_search_meilisearch.py#L491-L493
# https://github.com/meilisearch/meilisearch-python/blob/d5a0babe50b4ce5789892845db98b30d4db72203/tests/conftest.py#L132-L146

VECOR_NAME = "docs-embed"
VECOR_DIM = 768
VECTOR_NAME = "docs-embed"
VECTOR_DIM = 768 # dim of https://huggingface.co/BAAI/bge-base-en-v1.5

MeilisearchFunc = Callable[..., Tuple[Client, TaskInfo]]

Expand Down Expand Up @@ -56,7 +56,7 @@ def wrapped_meilisearch_function(*args, **kwargs):
@wait_for_task_completion
def create_embedding_db(client: Client, index_name: str):
index = client.index(index_name)
task_info = index.update_embedders({VECOR_NAME: {"source": "userProvided", "dimensions": VECOR_DIM}})
task_info = index.update_embedders({VECTOR_NAME: {"source": "userProvided", "dimensions": VECTOR_DIM}})
return client, task_info


Expand Down Expand Up @@ -93,7 +93,7 @@ def add_embeddings_to_db(client: Client, index_name: str, embeddings):
"source_page_url": e.source_page_url,
"source_page_title": e.source_page_title,
"library": e.package_name,
"_vectors": {VECOR_NAME: e.embedding},
"_vectors": {VECTOR_NAME: e.embedding},
}
for e in embeddings
]
Expand Down

0 comments on commit 7cc64e3

Please sign in to comment.