This commit is contained in:
11
docs/snippets/elixir/utils/standalone_embed.md
Normal file
11
docs/snippets/elixir/utils/standalone_embed.md
Normal file
@@ -0,0 +1,11 @@
|
||||
```elixir
|
||||
# Embed with default config
|
||||
{:ok, embeddings} = Kreuzberg.embed(["Hello world", "How are you?"])
|
||||
|
||||
# Embed with specific preset
|
||||
config = %Kreuzberg.EmbeddingConfig{model: {:preset, "fast"}}
|
||||
{:ok, embeddings} = Kreuzberg.embed(["Hello world"], config)
|
||||
|
||||
# Raise on error
|
||||
embeddings = Kreuzberg.embed!(["Hello world"])
|
||||
```
|
||||
Reference in New Issue
Block a user