diff --git a/meilisearch/models/index.py b/meilisearch/models/index.py index ada1782b..e1e286f9 100644 --- a/meilisearch/models/index.py +++ b/meilisearch/models/index.py @@ -56,10 +56,11 @@ class ProximityPrecision(str, Enum): class OpenAiEmbedder(CamelBase): source: str = "openAi" - model: Optional[str] = None # Defaults to text-embedding-ada-002 + model: Optional[str] = None # Defaults to text-embedding-3-small dimensions: Optional[int] = None # Uses the model default api_key: Optional[str] = None # Can be provided through a CLI option or environment variable document_template: Optional[str] = None + document_template_max_bytes: Optional[int] = None # Default to 400 class HuggingFaceEmbedder(CamelBase): @@ -67,6 +68,7 @@ class HuggingFaceEmbedder(CamelBase): model: Optional[str] = None # Defaults to BAAI/bge-base-en-v1.5 revision: Optional[str] = None document_template: Optional[str] = None + document_template_max_bytes: Optional[int] = None # Default to 400 class UserProvidedEmbedder(CamelBase): diff --git a/tests/index/test_index_search_meilisearch.py b/tests/index/test_index_search_meilisearch.py index ddf56e60..64840687 100644 --- a/tests/index/test_index_search_meilisearch.py +++ b/tests/index/test_index_search_meilisearch.py @@ -505,7 +505,8 @@ def test_show_ranking_score(index_with_documents): @pytest.mark.usefixtures("enable_vector_search") def test_vector_search(index_with_documents_and_vectors): response = index_with_documents_and_vectors().search( - "", opt_params={"vector": [0.1, 0.2], "hybrid": {"semanticRatio": 1.0}} + "", + opt_params={"vector": [0.1, 0.2], "hybrid": {"semanticRatio": 1.0, "embedder": "default"}}, ) assert len(response["hits"]) > 0