Input text to embed, encoded as a string or array of tokens. To get embeddings
for multiple inputs in a single request, pass an array of strings or array of
token arrays.
from openai import OpenAIclient = OpenAI(base_url="https://api.naga.ac/v1", api_key="YOUR_API_KEY")resp = client.embeddings.create( model="text-embedding-3-small", input=[ "The food was delicious!", "Service could be faster.", ], # dimensions=512, # if supported # encoding_format="base64",)print(resp)
Returns embedding vectors per input. The structure is compatible with OpenAI’s embeddings API. When encoding_format="float", vectors are float arrays; with "base64", vectors are base64-encoded.