openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

use openai cli "chat_completions.create" failed to generate a response of sufficient length, and setting "--max-tokens" did not work.

Open oiuv opened this issue 1 year ago • 3 comments

Describe the bug

use openai cli “chat_completions.create" failed to generate a response of sufficient length, and setting "--max-tokens" did not work.

To Reproduce

By default, the number of tokens the model can return will be (4096 - prompt tokens). but not in cli mode

Code snippets

openai api chat_completions.create  -m gpt-3.5-turbo -g user '请给出10个使用chatGPT的示例'

OS

Ubuntu

Python version

Python v3.10.6

Library version

openai v0.27.0

oiuv avatar Mar 07 '23 05:03 oiuv

What happened when you tried to set --max-tokens? Do you have output showing it not generating enough tokens?

hallacy avatar Mar 07 '23 14:03 hallacy

What happened when you tried to set --max-tokens? Do you have output showing it not generating enough tokens?

just like this:

openai api chat_completions.create -m gpt-3.5-turbo -g user "20 examples of AI applications" -M 2048

1. Intelligent virtual assistants like Siri, Alexa, and Google Assistant
2. Chatbots for customer service and support
3. Spam filters for email
4. Predictive text and autocorrect in messaging apps
5. Fraud detection in financial transactions
6. Personalized product recommendations on e-commerce sites
7. Sentiment analysis of social media posts and customer reviews
8. Image and speech recognition for security and surveillance
9. AI-powered medical diagnosis and treatment recommendations
10. Intelligent

Incomplete content display~

oiuv avatar Mar 08 '23 09:03 oiuv

I have the same issue, Incomplete content display~ happened to me. and it will stuck for a long time. no response!

Versus2017 avatar Mar 21 '23 06:03 Versus2017

Same problem here!

einarpersson avatar Mar 29 '23 17:03 einarpersson