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
| Parameter | Type | Description |
|---|---|---|
model | string | Must be jade-mole-4. |
input | string or array | The text(s) to embed. |
encoding_format | string | Optional. float (default) or base64. |
Endpoint
POST /v1/embeddings
See the full Embeddings API reference.