Skip to content

Inconsistent performance of chat api #1036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
Zhang-Zelong opened this issue Jan 2, 2024 · 1 comment
Closed
1 task done

Inconsistent performance of chat api #1036

Zhang-Zelong opened this issue Jan 2, 2024 · 1 comment

Comments

@Zhang-Zelong
Copy link

Zhang-Zelong commented Jan 2, 2024

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

When call the client.chat.completions.create(..., logprobs=True) with gpt-3.5-turbo-1106
Sometime it will raise below error

Error code: 400 - {'error': {'message': "This model does not support the 'logprobs' parameter.", 'type': 'invalid_request_error', 'param': 'logprobs', 'code': None}}

To Reproduce

Run the code snippets in jupyter about 5~8 times, sometime it run correctly, somtime will raise an error.
https://platform.openai.com/docs/api-reference/chat/create?lang=python

Code snippets

from openai import OpenAI
client = OpenAI()

completion = client.chat.completions.create(
  model="gpt-3.5-turbo",
  messages=[
    {"role": "user", "content": "Hello!"}
  ],
  logprobs=True,
  top_logprobs=2
)

OS

Linux

Python version

python3.9.13

Library version

openai v1.6.1

@Zhang-Zelong Zhang-Zelong added the bug Something isn't working label Jan 2, 2024
@rattrayalex
Copy link
Collaborator

This issue is a duplicate; see #975 (comment)

@rattrayalex rattrayalex closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2024
@rattrayalex rattrayalex removed the bug Something isn't working label Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants