The supported model
Model and context length for Baichuan API support:
Baichuan Models
Platform | Model Identifier | Notes |
---|---|---|
Baichuan | Baichuan2-Turbo | |
Baichuan | Baichuan2-Turbo-192k |
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="Baichuan2-Turbo",
)
print(chat_completion.choices[0].message.content)