Files
herolib/lib/clients/openai/embeddings/README.md
2025-10-12 12:30:19 +03:00

18 lines
388 B
Markdown

# Quick Example: Creating Embeddings
```v
import incubaid.herolib.clients.openai
mut client:= openai.get()! //will be the default client, key is in `AIKEY` on environment variable or `OPENROUTER_API_KEY`
text_to_embed := 'The quick brown fox jumps over the lazy dog.'
resp := client.embeddings.create_embedding(
input: text_to_embed,
model: 'text-embedding-ada-002'
)!
```