The supported model
Model and context length for Gemini API support:
Gemini Models
Platform | Model Identifier | Notes |
---|---|---|
gemini | google/gemini-pro | |
gemini | google/gemini-pro-vision | Vision-focused variant |
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="google/gemini-pro",
)
print(chat_completion.choices[0].message.content)