gpt4free
gpt4free copied to clipboard
forefront error (python 3.8.13)
Traceback (most recent call last):
File "/home/avencores/Рабочий стол/Данные/Проекты GitHub/free-chatpt4.0-cli/venv/lib64/python3.8/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib64/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 4, in <module>
token = forefront.Account.create(logging=False)
File "/home/avencores/Рабочий стол/Данные/Проекты GitHub/free-chatpt4.0-cli/forefront/__init__.py", line 61, in create
for _ in mail.fetch_inbox():
File "/home/avencores/Рабочий стол/Данные/Проекты GitHub/free-chatpt4.0-cli/forefront/mail.py", line 50, in fetch_inbox
return self.client.get(f"https://api.mail.tm/messages").json()["hydra:member"]
File "/home/avencores/Рабочий стол/Данные/Проекты GitHub/free-chatpt4.0-cli/venv/lib64/python3.8/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[test.py]
import forefront
token = forefront.Account.create(logging=False)
print(token)
for response in forefront.StreamingCompletion.create(token = token,
prompt = 'hello world', model='gpt-4'):
print(response.completion.choices[0].text, end = '')
print("")
They changed their key to email link in strategy and also removed the verification code in the email that the method was trying to grep. I think they're also encoding the token in the cookies instead of the response?
I don't really know though as I have almost 0 reverse engineering experience.
I've managed to work around both but can't seem to figure out the stream now. They seemed to have changed the authority urls at the very least.
Yes
How did you make it work?
I copy token from authorization: Bearer xxxx
- Press F12
- Go to Tab Network
- Ask forefront
- Back to Tab Network >> chat >> authorization: Bearer xxxx >> Copy xxxx
- Replace token = forefront.Account.create(logging=False) >> token = xxxx
No error but return nothing:)
I copy token from authorization: Bearer xxxx
- Press F12
- Go to Tab Network
- Ask forefront
- Back to Tab Network >> chat >> authorization: Bearer xxxx >> Copy xxxx
- Replace token = forefront.Account.create(logging=False) >> token = xxxx
No error but return nothing:)
The token is different for each chat, so you have to find out the way to generate it.