-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
May you please share a documentation regarding the correct usage of logprobs parameter in Chat Completion API as well as support for the following models.
- gpt-4-0613
- gpt-4-1106-Preview
Currently, when using the parameter with the above models the following errors are returned by the Chat Completion API. openai version is 1.7.2
gpt-4-06-13
BadRequestError: Error code: 400 - {'error': {'message': 'Unrecognized request argument supplied: logprobs', 'type': 'invalid_request_error', 'param': None, 'code': None}}
gpt-4-1106
BadRequestError: Error code: 400 - {'error': {'message': "This model does not support the 'logprobs' parameter.", 'type': 'invalid_request_error', 'param': 'logprobs', 'code': None}}
To Reproduce
Please see code snippet below.
Code snippets
from openai import AzureOpenAI
client = AzureOpenAI(
azure_endpoint = 'API_ENDPOINT',
api_key='API_KEY',
api_version='2023-05-15',
azure_deployment = 'gpt-4-1106'
)
response = client.chat.completions.create(
model='gpt-4',
messages=[
{....}
],
logprobs=True,
top_logprobs=2
)
response
OS
Windows11
Python version
Python v3.11.2
Library version
openai v1.7.2
julien-gaugaz
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working