Our account has paid more than the $1 to unlock GPT-4 access. We are wondering is there a way to call the API to determine what model you are using? I know that sounds odd.
Take for example this script using “gpt-4-0613” for the model. The response is “No, I am OpenAI’s language model, GPT-3. GPT-4 has not been released yet.” However, the response object says the model: “gpt-4-0613”
What do you get when you run this script?
import openai
openai.api_key = "your_api_key"
messages = [ {"role": "user", "content": "are you gpt-4?" } ]
model = "gpt-4-0613"
response = openai.ChatCompletion.create(
model=model,
messages=messages,
)
print(response)
our response:
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "No, I am OpenAI's language model, GPT-3. GPT-4 has not been released yet.",
"role": "assistant"
}
}
],
"created": 1691185166,
"id": "chatcmpl-...",
"model": "gpt-4-0613",
"object": "chat.completion",
"usage": {
"completion_tokens": 25,
"prompt_tokens": 14,
"total_tokens": 39
}
}