Предварительная модель GPT-4 с улучшенным следованием инструкциям, режимом JSON, воспроизводимыми выходными данными, параллельным вызовом функций и многим другим. Обучающие данные: до декабря 2023 года. **Примечание:** сильно ограничена по запросам от OpenAI на этапе предварительного просмотра.
from openai import OpenAI
client = OpenAI(
base_url="https://infergate.ru/api/v1",
api_key="sk-•••",
)
resp = client.chat.completions.create(
model="openai/gpt-4-turbo-preview",
messages=[{"role": "user", "content": "Привет!"}],
)
print(resp.choices[0].message.content)modelstringобязательныйmessagesarrayобязательныйtemperaturenumbermax_tokensintegertop_pnumberstopstring | string[]frequency_penaltynumberpresence_penaltynumberseedintegerlogit_biasobjectlogprobsbooleantop_logprobsintegerresponse_formatstructured_outputsbooleantoolsarraytool_choicestring | object