支持的模型

Spark API支持的模型和上下文长度:

Spark 模型

平台模式标识符备注
Sparkspark-V1.5
Sparkspark-V2.0
Sparkspark-V3.0
from openai import OpenAI

client = OpenAI(
    api_key = "自己的API key",
    base_url = "https://api.fe8.cn/v1"
)

chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "你是谁,用中文回答",
        }
    ],
    model="spark-V1.5",
)
print(chat_completion.choices[0].message.content)

Was this page helpful?