I use GPT-4 via openai Python library and Azure OpenAI. How can I find out the GPT-4 model version by using the openai Python library (and not looking at https://portal.azure.com/ because for some Azure OpenAI instances I only have the credentials to use the API but I can't view them on https://portal.azure.com/)?
I read:
https://platform.openai.com/docs/models/continuous-model-upgrades:
You can verify this by looking at the response object after sending a request. The response will include the specific model version used (e.g. gpt-3.5-turbo-0613).
https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo:
gpt-4 currently points to
gpt-4-0613.
However, I tried calling gpt-4 version 0314 and gpt-4 version 0125-preview: for both of them, the response object after sending a request only contains gpt-4:
ChatCompletion(
id='chatcmpl-8slN5Cbbsdf16s51sdf8yZpRXZM1R',
choices=[
Choice(
finish_reason='stop',
index=0,
logprobs=None,
message=ChatCompletionMessage(
content='blahblah',
role='assistant',
function_call=None,
tool_calls=None
),
content_filter_results={
'hate': {'filtered': False, 'severity': 'safe'},
'self_harm': {'filtered': False, 'severity': 'safe'},
'sexual': {'filtered': False, 'severity': 'safe'},
'violence': {'filtered': False, 'severity': 'safe'}
}
)
],
created=1708062499,
model='gpt-4',
object='chat.completion',
system_fingerprint='fp_8absdfsdsfs',
usage=CompletionUsage(
completion_tokens=185,
prompt_tokens=4482,
total_tokens=4667
),
prompt_filter_results=[
{
'prompt_index': 0,
'content_filter_results': {
'hate': {'filtered': False, 'severity': 'safe'},
'self_harm': {'filtered': False, 'severity': 'safe'},
'sexual': {'filtered': False, 'severity': 'safe'},
'violence': {'filtered': False, 'severity': 'safe'}
}
}
]
)
How can I find out the GPT-4 model version when using openai Python library and Azure OpenAI?