Skip to main content

Overview

Generate text embeddings from the command line. Both embed and embedding commands work identically.
Both praisonai embed and praisonai embedding work the same way - use whichever you prefer.

Commands

Basic Embedding

praisonai embed "Hello world"
# or
praisonai embedding "Hello world"

With Model Selection

praisonai embed "Hello world" --model text-embedding-3-large

With Custom Dimensions

praisonai embed "Hello world" --dimensions 256

Options

OptionShortDefaultDescription
--model-mtext-embedding-3-smallEmbedding model
--dimensions-dNoneOutput 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 256

Output

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: 4

Supported Models

All LiteLLM-supported embedding models work:
  • text-embedding-3-small (default)
  • text-embedding-3-large
  • text-embedding-ada-002
  • cohere/embed-english-v3.0
  • And many more