Skip to content

Commit

Permalink
Merge pull request #4019 from nulib/4581-update-model-name
Browse files Browse the repository at this point in the history
Update the OpenSearch ingest pipeline to use the correct model name
  • Loading branch information
mbklein authored Jun 14, 2024
2 parents 44fdd2d + a62f37c commit 1f3b7d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/lib/meadow/search/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ defmodule Meadow.Search.Index do

defp embedding_model_name(model_id) do
case HTTP.get(["_plugins", "_ml", "models", model_id]) do
{:ok, %{status_code: 200, body: %{"name" => name}}} -> name
_ -> nil
{:ok, %{status_code: 200, body: %{"name" => name}}} ->
Regex.replace(~r[^.+/huggingface/], name, "")

_ ->
nil
end
end

Expand Down

0 comments on commit 1f3b7d8

Please sign in to comment.