Embeddings

Embeddings are numerical vectors that represent text’s meaning, enabling machines to compare and analyze language. They power tasks like search, classification, and recommendations by capturing semantic relationships in a compact form.

To get a full list of embedding models visit cortecs.ai and filter by the Embedding tag.

from openai import OpenAI

client = OpenAI(
  base_url="https://cortecs.ai/api/v1/models/serverless/embeddings",
  api_key="<API_KEY>",
)

response = client.embeddings.create(
    input="Your text string goes here",
    model="<MODEL_NAME>"
)

print(response.data[0].embedding)

Last updated