Embeddings CLI
CLI commands for generating text embeddings
Overview
Generate text embeddings from the command line. Both embed and embedding commands work identically.
Commands
Basic Embedding
praisonai embed "Hello world"
# or
praisonai embedding "Hello world"With Model Selection
praisonai embed "Hello world" --model text-embedding-3-largeWith Custom Dimensions
praisonai embed "Hello world" --dimensions 256Options
| Option | Short | Default | Description |
|---|---|---|---|
--model | -m | text-embedding-3-small | Embedding model |
--dimensions | -d | None | Output dimensions |
Examples
# Generate embedding using 'embed' command
praisonai embed "Machine learning is fascinating"
# Same thing using 'embedding' command
praisonai embedding "Machine learning is fascinating"
# Use larger model
praisonai embed "AI research" -m text-embedding-3-large
# Reduce dimensions for efficiency
praisonai embed "Hello" -m text-embedding-3-large -d 256Output
The command outputs:
- Number of embedding vectors generated
- Dimensions of each vector
- Token usage statistics
$ praisonai embed "Hello world"
Embeddings generated: 1 vectors
Dimensions: 1536
Tokens: 4Supported Models
All LiteLLM-supported embedding models work:
text-embedding-3-small(default)text-embedding-3-largetext-embedding-ada-002cohere/embed-english-v3.0- And many more