{"id":18417910,"url":"https://github.com/5eroo/CGPTNoLogin-Wrapper","last_synced_at":"2025-04-07T12:32:54.319Z","repository":{"id":220821106,"uuid":"752658105","full_name":"5eroo/CGPTNoLogin-Wrapper","owner":"5eroo","description":"A Wrapper for https://chatgptnologin.com in python. Flask server which acts as a \"real\" OpenAI server (reverse proxy)","archived":false,"fork":false,"pushed_at":"2024-05-18T15:28:30.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T23:49:28.603Z","etag":null,"topics":["chatgpt","flask","gpt","gpt3","gpt4","openai","py","py3","python","reverse-engineering","reverse-proxy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5eroo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-04T12:59:25.000Z","updated_at":"2024-09-26T02:47:49.000Z","dependencies_parsed_at":"2024-02-04T16:05:33.415Z","dependency_job_id":"bfbae185-b0c1-4a37-a8bf-0be3f3620b33","html_url":"https://github.com/5eroo/CGPTNoLogin-Wrapper","commit_stats":null,"previous_names":["recentaly/cgptnologin-wrapper","itszerrin/cgptnologin-wrapper","5eroo/cgptnologin-wrapper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FCGPTNoLogin-Wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FCGPTNoLogin-Wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FCGPTNoLogin-Wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5eroo%2FCGPTNoLogin-Wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5eroo","download_url":"https://codeload.github.com/5eroo/CGPTNoLogin-Wrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247653400,"owners_count":20973824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","flask","gpt","gpt3","gpt4","openai","py","py3","python","reverse-engineering","reverse-proxy"],"created_at":"2024-11-06T04:12:14.119Z","updated_at":"2025-04-07T12:32:53.388Z","avatar_url":"https://github.com/5eroo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CGPTNoLogin-Wrapper\n\n## Overview\n\nCGPTNoLogin-Wrapper is a Python wrapper for [ChatGPT No Login](https://chatgptnologin.com/), designed to simplify interactions with OpenAI's language models. This wrapper acts as a \"real\" OpenAI server, serving as a reverse proxy for the ChatGPT No Login API. It eliminates the need for explicit API keys, making it seamless for developers to integrate OpenAI's powerful language models into their applications.\n\n## Features\n\n- **Flask Server**: Utilizes the Flask framework to create an HTTP server, offering a scalable solution for handling requests.\n\n- **Reverse Proxy**: Acts as a reverse proxy for the ChatGPT No Login API, allowing developers to seamlessly make requests to the wrapper as if it were the actual OpenAI server.\n\n- **Model Selection**: Supports multiple language models, with the default being \"gpt-3.5-turbo.\" Developers can easily specify the desired model in their requests.\n\n- **Temperature Control**: Allows users to control the randomness of the model's responses by setting the temperature parameter.\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/Recentaly/CGPTNoLogin-Wrapper.git\n   cd CGPTNoLogin-Wrapper\n   ```\n\n2. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\n1. Run the wrapper:\n   ```bash\n   python app.py\n   ```\n\n2. Make API requests to `http://localhost:5000`:\n\n   - **Chat Completion Endpoint**: Send POST requests to `/chat/completions` with a JSON payload containing messages, model information, and optional temperature settings.\n\n     Example:\n     ```bash\n     curl -X POST -H \"Content-Type: application/json\" -d @example_payload.json http://localhost:5000/chat/completions\n     ```\n\n   - **Get Models Endpoint**: Send GET requests to `/models` to retrieve a list of available models.\n\n     Example:\n     ```bash\n     curl http://localhost:5000/models\n     ```\n\n## Code Structure\n\n- **app.py**: The main Flask application file that handles HTTP requests. It defines routes for chat completions and getting available models.\n\n- **res/src/Api.py**: The API class responsible for interacting with the ChatGPT No Login API. It includes methods for fetching available models and initiating a chat.\n\n## Configuration\n\n- **Models**: Models are specified in the `models` dictionary within `app.py`. You can add or modify models by updating this dictionary.\n\n- **Server Configuration**: The Flask server runs on `http://0.0.0.0:5000` by default. You can customize the host and port in the `if __name__ == \"__main__\":` block in `app.py`.\n\n## Understanding Models\n\n### Available Models\n\nThe wrapper provides support for multiple models. Some examples include:\n\n- **gpt-3.5-turbo**: Default model for general-purpose language tasks.\n- **gpt-4-0125-preview**: More advanced, newest OpenAI model.\n- **gpt-4-1106-preview** Also more advanced but a tiny bit filtered.\n\n### Fetching Model Information\n\nTo retrieve information about available models, make a GET request to `/models`. This will return a JSON object containing details about each model, including `id` and `name`.\n\nExample Response:\n```json\n{\n  \"data\": [\n    {\"id\": \"gpt-3.5-turbo\", \"name\": \"GPT-3.5 Turbo\"},\n    {\"id\": \"gpt-4-0125-preview\", \"name\": \"GPT-4\"},\n    {\"id\": \"gpt-4-1106-preview\", \"name\": \"GPT-4\"}\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5eroo%2FCGPTNoLogin-Wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5eroo%2FCGPTNoLogin-Wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5eroo%2FCGPTNoLogin-Wrapper/lists"}