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

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

With Model Selection

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

With Custom Dimensions

bash
praisonai embed "Hello world" --dimensions 256

Options

OptionShortDefaultDescription
--model-mtext-embedding-3-smallEmbedding model
--dimensions-dNoneOutput dimensions

Examples

bash
# 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
bash
$ 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