Skip to content

Commit

Permalink
Add embeddings select to knowledge modal
Browse files Browse the repository at this point in the history
  • Loading branch information
michalwarda committed Feb 17, 2024
1 parent e564269 commit 618154b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions apps/api/lib/buildel/blocks/block.ex
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,35 @@ defmodule Buildel.Blocks.Block do
"title" => "Name",
"description" => "The name for collection.",
"minLength" => 1
},
"embeddings" => %{
"type" => "object",
"title" => "Embeddings",
"description" => "The embeddings to use for the collection.",
"required" => ["api_type", "model", "secret_name"],
"properties" => %{
"api_type" => %{
"type" => "string",
"title" => "API Type",
"description" => "The type of the embeddings API.",
"enum" => ["openai"],
"default" => "openai",
"enumPresentAs" => "radio"
},
"model" => %{
"type" => "string",
"title" => "Model",
"description" => "The model to use for the embeddings.",
"default" => "text-embedding-ada-002",
"enum" => ["text-embedding-ada-002"],
"enumPresentAs" => "radio"
},
"secret_name" =>
secret_schema(%{
"title" => "Embeddings Secret",
"description" => "The secret to use for the embeddings."
})
}
}
}
}
Expand Down

0 comments on commit 618154b

Please sign in to comment.