xtekky / gpt4free

The official gpt4free repository | various collection of powerful language models
https://g4f.ai
GNU General Public License v3.0
61.21k stars 13.33k forks source link

No providers are working ? #1046

Closed XenocodeRCE closed 1 year ago

XenocodeRCE commented 1 year ago

Bug description I use the code shown on the README.md of this repo. It has been working really well for a few days now, but since yesterday whatever I send in the prompt, I always get "Hello, how can I assist you today?".

import g4f

# Automatic selection of provider

prompt = """
my prompt
"""

# streamed completion
response = g4f.ChatCompletion.create(
    model=""gpt-3.5-turbo"",
    messages=[{""role"": ""user"", ""content"": ""Hello""}],
    stream=True,
)

for message in response:
    print(message, flush=True, end='')

Environement

XenocodeRCE commented 1 year ago

g4f.Provider.AItianhu

\Provider\AItianhu.py", line 53, in create_async_generator
    raise RuntimeError("Solve challenge and pass cookies")
RuntimeError: Solve challenge and pass cookies

g4f.Provider.Acytoo

aiohttp\client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 429, message='Too Many Requests', url=URL('https://chat.acytoo.com/api/completions')

g4f.Provider.Aichat

aiohttp\client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://chat-gpt.org/api/text')

g4f.Provider.Ails

Provider\Ails.py", line 74, in create_async_generator
    raise Exception("Response Error: " + token)
Exception: Response Error: Please visit: https://ai.ls

g4f.Provider.Bing

H
e
l
l
o
,

t
h
i
s

i
s

B
i
n
g
.

H
o
w

c
a
n

I

h
e
l
p
?

Python310\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f60a' in position 0: character maps to <undefined>

aiohttp\client.py", line 795, in _ws_connect
    raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 503, message='Invalid response status', url=URL('wss://sydney.bing.com/sydney/ChatHub?sec_access_token=6O/yCTZJLLDWiuq6qctJYQTIptYrKYqWhk9pKc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vL7gDnifaXDquvs8BEg9fideSKz6ibOPXXeBv5EPW6r35H5WTUccna93X9oC8hO1QGdTJFTUcw%3D%3D')

g4f.Provider.ChatBase

H
e
l
l
o
!

H
o
w

c
a
n

I

a
s
s
i
s
t

y
o
u

t
o
d
a
y
?

g4f.Provider.ChatgptAi

aiohttp\client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 429, message='Too Many Requests', url=URL('https://chatgpt.ai/')

g4f.Provider.ChatgptLogin

depeciated 

i'll do a favor and stop here, but basicaly 0 provider is working as intended.

xtekky commented 1 year ago

you can set the provider to None, which will activate a Retry System and work as intended

hlohaus commented 1 year ago

You have to replace "Hello" with your prompt.