Search Documentation

Search for pages and headings in the documentation

jade-mole-4

jade-mole-4 is Liutong’s embeddings model. It converts text into high-dimensional vector representations suitable for semantic search, clustering, classification, and retrieval-augmented generation (RAG).

Capabilities

  • Semantic text similarity
  • Document search and retrieval
  • Clustering and classification
  • RAG (Retrieval-Augmented Generation) pipelines

API usage

from openai import OpenAI

client = OpenAI(
    base_url="https://api.liutong.llby.org/v1",
    api_key="lt_your_api_key",
)

response = client.embeddings.create(
    model="jade-mole-4",
    input="Liutong provides affordable LLM inference.",
)

embedding = response.data[0].embedding
print(f"Dimensions: {len(embedding)}")

Batch embeddings

response = client.embeddings.create(
    model="jade-mole-4",
    input=[
        "First document to embed.",
        "Second document to embed.",
        "Third document to embed.",
    ],
)

for item in response.data:
    print(f"Index {item.index}: {len(item.embedding)} dimensions")

Parameters

ParameterTypeDescription
modelstringMust be jade-mole-4.
inputstring or arrayThe text(s) to embed.
encoding_formatstringOptional. float (default) or base64.

Endpoint

POST /v1/embeddings

See the full Embeddings API reference.