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

Sorry, you have been blocked #124

Open
artickc opened this issue Nov 16, 2023 · 5 comments
Open

Sorry, you have been blocked #124

artickc opened this issue Nov 16, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@artickc
Copy link

artickc commented Nov 16, 2023

Describe the bug

Please enable cookies.
Sorry, you have been blocked

To Reproduce

    $prompt = json_encode($textObj)."\nTranslate to: ".$lagnString.".\nRetun all translations in JSON with this structure: \n".$jsonString;
    $result = $open_ai->chat([
        'model' => 'gpt-3.5-turbo',
        'messages' => [
            [
                "role" => "user",
                "content" => $prompt
            ]
        ],
        'temperature' => 0,
        'max_tokens' => 2000,
        'frequency_penalty' => 0,
        'presence_penalty' => 0,
    ]);

    print_r($result);

Code snippets

No response

OS

linux

PHP version

PHP 7.4

Library version

4.9

@artickc artickc added the bug Something isn't working label Nov 16, 2023
@NDanilov2015
Copy link

NDanilov2015 commented Nov 16, 2023

Possibly, in your country chatGPT API can't more be using in usual way due to politics of OpenAI company. But you can try find normal proxy and try use $open_ai->setProxy("https://address:port")

@SalimF
Copy link

SalimF commented Dec 12, 2023

$open_ai->setProxy("https://address:port")

Hello, how can I add proxy user and password?
I notice $curl_info class property didn't have option for proxy password

@orhanerday
Copy link
Owner

orhanerday commented Dec 13, 2023 via email

@SalimF
Copy link

SalimF commented Dec 13, 2023

You can use the following format: https://username:password@URL https://admin:admin@the-internet.herokuapp.com/basic_auth Let me know if this works for you or if you have any further questions.

Hi thanks for reply,
I added proxy like this

$open_ai->setProxy( "myuser:mypass@http://192.168.10.1:9999") ;

But still I got this error.

Unsupported proxy syntax in 'myuser:mypass@http://192.168.10.1:9999': Port number was not a decimal number between 0 and 65535

@orhanerday
Copy link
Owner

orhanerday commented Dec 14, 2023

Salim, did you test the proxy?

Maybe you can use

https://superuser.com/a/1179759

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

4 participants