支持的模型

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

OpenAI 模型

平台模式标识符备注
GPTgpt-3.5-turbo
GPTgpt-3.5-turbo-1106
GPTgpt-3.5-turbo-0125
GPTgpt-3.5-turbo-0613
GPTgpt-3.5-turbo-instruct
GPTgpt-3.5-turbo-16k
GPTgpt-3.5-turbo-16k-0613
GPTgpt-3.5-turbo-0301
GPTgpt-4-0125-preview
GPTgpt-4-1106-preview
GPTgpt-4-1106-vision-preview
GPTgpt-4
GPTdall-e-2
GPTdall-e-3
GPTgpt-4-0314
GPTgpt-4-0613
GPTgpt-4-32k-0314
GPTgpt-4-32k
GPTgpt-4-turbo-2024-04-09
GPTgpt-4-turbo
GPTgpt-4-turbo-preview
from openai import OpenAI

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

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

Was this page helpful?