The supported model

Model and context length for Spark API support:

Spark Models

PlatformModel IdentifierNotes
Sparkspark-V1.5
Sparkspark-V2.0
Sparkspark-V3.0
from openai import OpenAI

client = OpenAI(
    api_key = "Own API key",
    base_url = "https://api.zgiai.com/v1"
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Who are you?",
        }
    ],
    model="spark-V1.5 ",
)
print(chat_completion.choices[0].message.content)

Was this page helpful?