OpenAI
GPT-4
openai/gpt-4
OpenAI's flagship model, GPT-4 is a large-scale multimodal language model capable of solving difficult problems with greater accuracy than previous models due to its broader general knowledge and advanced reasoning capabilities. Training data: up to Sep 2021.
Tools
Function Calling
Context Window
8,192
Max Output Tokens
4,096
Using GPT-4 with Python API
Using GPT-4 with OpenAI compatible API
import openai
client = openai.Client(
api_key= '{your_api_key}',
base_url="https://api.model.box/v1",
)
response = client.chat.completions.create(
model="openai/gpt-4",
messages: [
{
role: 'user',
content:
'introduce your self',
},
]
)
print(response)