-
Notifications
You must be signed in to change notification settings - Fork 99
Add support for multi-modal search #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
814f5a9
2aa6057
5fced16
1488a95
97fb11e
50a5689
c72f12d
d67bd31
edf1780
6b40c1a
f3a9cf2
aac34cf
4e15544
e2cfbc4
887a7e3
caffc26
603df34
681d9ae
cebf135
a6f5057
f4984a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,6 +167,10 @@ class RestEmbedder(CamelBase): | |
| Template defining the data Meilisearch sends to the embedder | ||
| document_template_max_bytes: Optional[int] | ||
| Maximum allowed size of rendered document template (defaults to 400) | ||
| indexing_fragments: Optional[Dict[str, Dict[str, str]]] | ||
| Defines how to fragment documents for indexing (multi-modal search) | ||
| search_fragments: Optional[Dict[str, Dict[str, str]]] | ||
| Defines how to fragment search queries (multi-modal search) | ||
| request: Dict[str, Any] | ||
| A JSON value representing the request Meilisearch makes to the remote embedder | ||
| response: Dict[str, Any] | ||
|
|
@@ -185,6 +189,8 @@ class RestEmbedder(CamelBase): | |
| dimensions: Optional[int] = None | ||
| document_template: Optional[str] = None | ||
| document_template_max_bytes: Optional[int] = None | ||
| indexing_fragments: Optional[Dict[str, Dict[str, str]]] = None | ||
| search_fragments: Optional[Dict[str, Dict[str, str]]] = None | ||
|
||
| request: Dict[str, Any] | ||
| response: Dict[str, Any] | ||
| headers: Optional[Dict[str, str]] = None | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| """Tests for experimental features API.""" | ||
|
|
||
|
|
||
| def test_get_experimental_features(client): | ||
| """Test getting experimental features.""" | ||
| response = client.get_experimental_features() | ||
| assert isinstance(response, dict) | ||
| assert "multimodal" in response or "vectorStoreSetting" in response | ||
|
|
||
|
|
||
| def test_update_experimental_features(client): | ||
| """Test updating experimental features.""" | ||
| # Enable multimodal | ||
| response = client.update_experimental_features({"multimodal": True}) | ||
| assert isinstance(response, dict) | ||
| assert response.get("multimodal") is True | ||
|
|
||
| # Disable multimodal | ||
| response = client.update_experimental_features({"multimodal": False}) | ||
| assert isinstance(response, dict) | ||
| assert response.get("multimodal") is False | ||
|
|
||
|
|
||
| def test_update_multiple_experimental_features(client): | ||
| """Test updating multiple experimental features at once.""" | ||
| response = client.update_experimental_features({"multimodal": True, "vectorStoreSetting": True}) | ||
| assert isinstance(response, dict) | ||
| # At least one should be accepted (depending on Meilisearch version) | ||
| assert "multimodal" in response or "vectorStoreSetting" in response | ||
Strift marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.