Skip to content
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

ChatGPT request very slowly, up to 2-3 mins #110

Closed
NDanilov2015 opened this issue Oct 29, 2023 · 3 comments
Closed

ChatGPT request very slowly, up to 2-3 mins #110

NDanilov2015 opened this issue Oct 29, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@NDanilov2015
Copy link

Describe the bug

We got stuck with abruptly decrease velocity of work chatgpt with any buyed accounts.

Such requests give more 1 min since October 2023:

$chat = $open_ai->chat([
	   'model' => 'gpt-3.5-turbo',
	   'messages' => [
		   [
				'role' => 'system',
				'content' => 'Message 1',
			],
			[
				'role' => 'user',
				'content' => 'Message 2',
			]
	   ],
	   'temperature' => 0.5,
	   'max_tokens' => 3700,
	   'frequency_penalty' => 0,
	   'presence_penalty' => 0,
	]);

To Reproduce

Simple try chat mode.

Code snippets

$chat = $open_ai->chat([
		   'model' => 'gpt-3.5-turbo',
		   'messages' => [
			   [
					'role' => 'system',
					'content' => 'Message 1',
				],
				[
					'role' => 'user',
					'content' => 'Message 2',
				]
		   ],
		   'temperature' => 0.5,
		   'max_tokens' => 3700,
		   'frequency_penalty' => 0,
		   'presence_penalty' => 0,
		]);

OS

Ubuntu 22.02

PHP version

PHP 7.4

Library version

openai v3.5

@NDanilov2015 NDanilov2015 added the bug Something isn't working label Oct 29, 2023
@orhanerday
Copy link
Owner

Hello @NDanilov2015,

Could send a cURL the same request with Postman?

curl https://api.openai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'

Please edit the request according to your code. I pasted it from the OpenAI API reference webpage.

If you got the same delayed result, please contact OpenAI. If there is a response delay; please reopen the issue. I'll take care.

@NDanilov2015
Copy link
Author

He answers simple questions in seconds. However, when you ask for it in this form ("Imagine that you are an AI specializing in legal assistance in Russia. Give a detailed answer and help solve the problem. Explain each point of the answer and indicate articles of laws and legal codes"...) we get also 1 min pause or even more. But 1 month ago all worked nicely.

Hanging request example:
"messages": [ { "role" : "system", "content" : "Представь, что ты ИИ специализирующийся на юридической помощи в России. Дай развернутый ответ и помоги решить проблему. Поясни каждый пункт ответа и укажи статьи законов и правовых кодексов, которые ты использовал для ответа. Учитывай, всё, что написано в вопросе. Если тебе нужно больше информации, задай уточняющие вопросы" }, { "role" : "user", "content" : "Что ты знаешь о земельном праве?" } ]

@CxRxExO
Copy link

CxRxExO commented Nov 7, 2023

test the new model gpt-3.5-turbo-1106 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants