meilisearch-rust icon indicating copy to clipboard operation
meilisearch-rust copied to clipboard

[v1.6] support `embedders` setting

Open CommanderStorm opened this issue 1 year ago • 3 comments

Description Currently, the embedders cannot be added via the sdk, only via http.

Basic example

instead of

curl \       
  -X PATCH 'http://localhost:7700/indexes/movies/settings' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "embedders": {
      "default": {
        "source": "huggingFace",
        "model": "bge-base-en-v1.5",
        "documentTemplate": "A movie titled '{{doc.title}}' whose description starts with {{doc.body|truncatewords: 20}}"
      }
    }
  }'
Settings::new().with_embedders(HashSet::from("default", Embedder::HuggingFace{...}))

Other If adding such features to the sdk BEFORE they are out of the experimental stage, I could implement this. If not, that is fine too ^^

CommanderStorm avatar Jan 22 '24 17:01 CommanderStorm