acheong08 / ChatGPT-to-API

Scalable unofficial ChatGPT API for production.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does this package call https://github.com/acheong08/ChatGPT-Proxy-V4 under the hood?

hongyi-zhao opened this issue · comments

IMO, the following two packages are wonderful and key tools when working with OpenAI API:

https://github.com/acheong08/ChatGPT-to-API
https://github.com/acheong08/ChatGPT-Proxy-V4

So, I want to know if the ChatGPT-TO-API calls ChatGPT-PROXY-V4 in the background to further simplify the access workflow?

It doesn't.

You can tell it to by setting API_REVERSE_PROXY="https://bypass.churchless.tech/conversation" or something like that

  1. Do you mean that all the endpoints exposed under the domain churchless.tech are constructed based on https://github.com/acheong08/ChatGPT-Proxy-V4?
  2. What is the difference between the following endpoints?

https://bypass.churchless.tech/conversation
https://free.churchless.tech/v1/chat/completions

  1. In addition, are there still other endpoints exposed in the domain churchless.tech?

See binary-husky/gpt_academic#900 (comment) for the related discussion.

Do you mean that all the endpoints exposed under the domain churchless.tech are constructed based on https://github.com/acheong08/ChatGPT-Proxy-V4?

No. The bypass endpoint can be used if your IP is banned by Cloudflare/OpenAI

What is the difference between the following endpoints?

Bypass: Gets around cloudflare. API format is identical to chat.openai.com

Free: Gets around cloudflare and makes the API format identical to api.openai.com

Bypass: Gets around cloudflare. API format is identical to chat.openai.com

If I understand correctly, the endpoint of this method is only applicable to applications that are compatible with web-based access, aka, without using API key.

For example, the https://github.com/binary-husky/gpt_academic works based on the API key, so the Bypass endpoint cannot be used directly with it, while the Free endpoint does, as you have commented here.

For example, the https://github.com/binary-husky/gpt_academic works based on the API key, so the Bypass endpoint cannot be used directly with it, while the Free endpoint does, as you have commented binary-husky/gpt_academic#900 (comment).

It's not a matter of whether it uses API key or not. The difference is in the API response format:

{"id":"chatcmpl-QXlha2FBbmROaXhpZUFyZUF3ZXNvbWUK","object":"chat.completion","created":0,"model":"gpt-3.5-turbo-0301","usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0},"choices":[{"index":0,"message":{"role":"assistant","content":"1"},"finish_reason":null}]}

vs

{"message": {"id": "787e1451-6c7d-4a07-bf33-16a99ec51755", "author": {"role": "assistant", 
"name": null, "metadata": {}}, "create_time": 1688381993.772501, "update_time": null, 
"content": {"content_type": "text", "parts": ["Hello! How can I assist you today?\n"]}, 
"status": "finished_successfully", "end_turn": true, "weight": 1.0, "metadata": 
{"message_type": "next", "model_slug": "gpt-4", "finish_details": {"type": "stop", "stop": 
"<|diff_marker|>"}}, "recipient": "all"}, "conversation_id": 
"c6639e58-2ebc-470e-a57e-d68ec5dcce0d", "error": null}

Why did the returned content, aka, ["Hello! How can I assist you today?"], not appear in the former response?

Oh. It was a different prompt

The response was "1"

The response was "1"

I see.

But how can I use https://bypass.churchless.tech/conversation as the endpoint of https://github.com/binary-husky/gpt_academic, as what you have commented here?