MoneyPrinter icon indicating copy to clipboard operation
MoneyPrinter copied to clipboard

[BUG] Multiple API Request Failures: Rate Limits, Server Errors, and Response Handling

Open timsayshey opened this issue 1 year ago • 1 comments

Encountered several issues while trying to retrieve stock videos using external services:

  1. 429 Too Many Requests: Hit rate limit on chat.fstha.com. How can we handle or increase rate limits?
  2. AttributeError: iter_content not found with FreeGpt. Is there an alternative method or fix?
  3. TypeError: Binary location must be a string for Chatgpt4Online. Expected format?
  4. 404 Not Found: Endpoint https://chat.chatgptdemo.ai unreachable. Correct URL?
  5. Server Errors (521, 500): GeekGpt and ChatgptDemo unresponsive. Any known issues?
  6. ContentTypeError: Received HTML instead of JSON from FakeGpt. How to ensure JSON response?
  7. Network Unreachable: Can't connect to you.com. Suggestions for troubleshooting?

Looking for guidance or updates to resolve these issues. Thanks!

FYI, I am not on a VPN and I am trying to access this from the US.

Error Message:

Could not retrieve stock videos: RetryProvider failed:
ChatgptNext: ClientResponseError: 429, message='Too Many Requests', url=URL('https://chat.fstha.com/api/openai/v1/chat/completions')
FreeGpt: AttributeError: 'StreamResponse' object has no attribute 'iter_content'
Chatgpt4Online: TypeError: Binary Location Must be a String
ChatgptDemoAi: ClientResponseError: 404, message='Not Found', url=URL('https://chat.chatgptdemo.ai/wp-json/mwai-ui/v1/chats/submit')
GeekGpt: HTTPError: 521 Server Error:  for url: https://ai.fakeopen.com/v1/chat/completions
FakeGpt: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://linux.do/t/topic/1051')
ChatgptDemo: ClientResponseError: 500, message='Internal Server Error', url=URL('https://chat.chatgptdemo.net/chat_api_stream')
You: ClientConnectorError: Cannot connect to host you.com:443 ssl:default [Network is unreachable]",

timsayshey avatar Feb 09 '24 00:02 timsayshey

Seems that all endpoints are experiencing issues since this repo went to the moon 🚀

Given the error codes, 429 obviously a rate limit initiated from their end.. 5xx errors related to the respective servers too.

  1. ContentTypeError: Received HTML instead of JSON from FakeGpt. How to ensure JSON response?

Fakegpt website is currently redirect to some Chinese blog post.. so it's returning html..

Going forward, I guess we should be adding more trusted (and/or paid) API endpoints to the repo as well.

I've had good results using mistralai/Mixtral-8x7B-Instruct-v0.1 in other projects.. it's free and can be used with HF InferenceClient..

If I have time will add PR to add this model for the prompt generation process.

1NoobDev avatar Feb 09 '24 01:02 1NoobDev

Yeah, I'd be happy to use my OpenAI API Key.

timsayshey avatar Feb 09 '24 01:02 timsayshey

Just reporting back that I got it working, I had issues with my network DNS that was blocking you.com and also my ImageMagick policy needed to be fixed. While it is working now, I would still like to see a way to use the official OpenAI API so we can use GPT-4, and it will be more reliable.

timsayshey avatar Feb 09 '24 02:02 timsayshey