Overview
LM Studio provides a user-friendly interface for running embedding models locally.Quick Start
CLI Usage
Setup
- Download and install LM Studio from https://lmstudio.ai
- Load an embedding model
- Start the local server
Generate embeddings using locally-hosted LM Studio
from praisonaiagents import embedding
result = embedding(
input="Hello world",
model="lm_studio/nomic-embed-text",
api_base="http://localhost:1234/v1"
)
print(f"Dimensions: {len(result.embeddings[0])}")
praisonai embed "Hello world" --model lm_studio/nomic-embed-text
export LM_STUDIO_API_BASE="http://localhost:1234/v1"