{"id":16552403,"url":"https://github.com/0xdevalias/poc-chatgpt","last_synced_at":"2025-03-04T16:44:33.437Z","repository":{"id":65662933,"uuid":"596802274","full_name":"0xdevalias/poc-chatgpt","owner":"0xdevalias","description":"Proof of Concept code playing around with the OpenAI / GPT / ChatGPT API","archived":false,"fork":false,"pushed_at":"2024-08-21T01:26:48.000Z","size":156,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-01T19:49:07.880Z","etag":null,"topics":["chatgpt","chatgpt-api","chatgpt-api-wrapper","chatgpt-sdk","gpt-3","openai"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xdevalias.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},"funding":{"github":"0xdevalias","ko_fi":"devalias","custom":["https://buymeacoff.ee/devalias"]}},"created_at":"2023-02-03T00:28:44.000Z","updated_at":"2024-12-28T00:42:53.000Z","dependencies_parsed_at":"2023-02-18T02:30:38.024Z","dependency_job_id":"9c6dab8d-d78f-4609-a4dd-bf799addf44f","html_url":"https://github.com/0xdevalias/poc-chatgpt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdevalias%2Fpoc-chatgpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdevalias%2Fpoc-chatgpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdevalias%2Fpoc-chatgpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdevalias%2Fpoc-chatgpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xdevalias","download_url":"https://codeload.github.com/0xdevalias/poc-chatgpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241885898,"owners_count":20036956,"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","chatgpt-api","chatgpt-api-wrapper","chatgpt-sdk","gpt-3","openai"],"created_at":"2024-10-11T19:44:48.409Z","updated_at":"2025-03-04T16:44:33.417Z","avatar_url":"https://github.com/0xdevalias.png","language":"Shell","readme":"# poc-chatgpt\n\nRun this script ([Source](./index.js)):\n\n```bash\n# https://platform.openai.com/account/api-keys\nexport OPENAI_API_KEY=TODO-YOUR-API-KEY-HERE\n\nnode index.js\n```\n\nList available models ([Ref](https://platform.openai.com/docs/api-reference/models/list)):\n\n```bash\n# https://platform.openai.com/account/api-keys\nexport OPENAI_API_KEY=TODO-YOUR-API-KEY-HERE\n\n# Fetch all the model data\ncurl https://api.openai.com/v1/models -H \"Authorization: Bearer $OPENAI_API_KEY\" \u003e models.json\n\n# Extract just the model names from the model data\njq -r '.data[].id' models.json \u003e models.txt\n\n# Or you could just run this helper script:\n# npm run-script update-models\n\n# You may also like to run:\n# npm run-script extract-models-by-owned-by\n```\n\n- [`models.json`](./models.json)\n  - [`models.txt`](./models.txt)\n  - [`models_by_owned_by.json`](./models_by_owned_by.json)\n    - [`./models_openai.txt`](./models_openai.txt)\n    - [`./models_openai-dev.txt`](./models_openai-dev.txt)\n    - [`./models_openai-internal.txt`](./models_openai-internal.txt)\n    - [`./models_system.txt`](./models_system.txt)\n\n\nGet details for a single model ([Ref](https://platform.openai.com/docs/api-reference/models/retrieve)):\n\n```bash\n# https://platform.openai.com/account/api-keys\nexport OPENAI_API_KEY=TODO-YOUR-API-KEY-HERE\n\n# Fetch a specific model's data\ncurl https://api.openai.com/v1/models/TODO-MODEL-ID-HERE -H \"Authorization: Bearer $OPENAI_API_KEY\" \u003e models.json\n```\n\nList available engines (deprecated) ([Ref](https://platform.openai.com/docs/api-reference/engines/list)):\n\n```bash\n# https://platform.openai.com/account/api-keys\nexport OPENAI_API_KEY=TODO-YOUR-API-KEY-HERE\n\n# Fetch all the engine data\ncurl https://api.openai.com/v1/engines -H \"Authorization: Bearer $OPENAI_API_KEY\" \u003e engines.json\n\n# Extract just the engine IDs from the engine data\njq -r '.data[].id' engines.json \u003e engines.txt\n\n# Or you could just run this helper script:\n# npm run-script update-engines\n```\n\n- [`engines.json`](./engines.json)\n  - [`engines.txt`](./engines.txt)\n\nGet details for a single engine (deprecated) ([Ref](https://platform.openai.com/docs/api-reference/engines/retrieve)):\n\n```bash\n# https://platform.openai.com/account/api-keys\nexport OPENAI_API_KEY=TODO-YOUR-API-KEY-HERE\n\n# Fetch a specific engine's data\ncurl https://api.openai.com/v1/engines/TODO-ENGINE-ID-HERE -H \"Authorization: Bearer $OPENAI_API_KEY\"\n```\n\n## Leaked Model Controversy\n\nYou can read more about my running notes/research around the leaked model, how it was taken down, and the supposed existence of a new model (though that situation seems super scammy) here:\n\n- [leaked-model.md](./leaked-model.md)\n\nThe following leaked model names have been found, and may or may not still be working:\n\n- `text-chat-davinci-002-20230126`\n- `text-chat-davinci-002-20221122`\n\n## See Also\n\n- https://github.com/openai/openai-node\n- https://platform.openai.com/account/api-keys\n- https://platform.openai.com/account/usage\n- https://platform.openai.com/docs/api-reference/introduction\n  - https://platform.openai.com/docs/api-reference/authentication\n  - https://platform.openai.com/docs/api-reference/models\n    - \u003e Models: List and describe the various models available in the API. You can refer to the Models documentation to understand what models are available and the differences between them.\n      - https://platform.openai.com/docs/models\n    - https://platform.openai.com/docs/api-reference/models/list\n      - `GET https://api.openai.com/v1/models`\n      - \u003e Lists the currently available models, and provides basic information about each one such as the owner and availability.\n    - https://platform.openai.com/docs/api-reference/models/retrieve\n      - `GET https://api.openai.com/v1/models/{model}`\n      - \u003e Retrieves a model instance, providing basic information about the model such as the owner and permissioning.\n  - https://platform.openai.com/docs/api-reference/engines\n    - \u003e Engines (deprectated): These endpoints describe and provide access to the various engines available in the API.\n    - \u003e The Engines endpoints are deprecated. Please use their replacement, Models, instead.\n      - https://platform.openai.com/docs/api-reference/engines/list\n        - \u003e `GET https://api.openai.com/v1/engines`\n        - \u003e `[DEPRECATED]` Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.\n      - https://platform.openai.com/docs/api-reference/engines/retrieve\n        - \u003e `GET https://api.openai.com/v1/engines/{engine_id}`\n        - \u003e `[DEPRECATED]` Retrieves a model instance, providing basic information about it such as the owner and availability.\n  - https://platform.openai.com/docs/api-reference/completions\n    - \u003e Completions: Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.\n    - https://platform.openai.com/docs/api-reference/completions/create\n      - `POST https://api.openai.com/v1/completions`\n      - \u003e Creates a completion for the provided prompt and parameters\n  - https://platform.openai.com/docs/api-reference/edits\n    - \u003e Edits: Given a prompt and an instruction, the model will return an edited version of the prompt.\n    - https://platform.openai.com/docs/api-reference/edits/create\n      - `POST https://api.openai.com/v1/edits`\n      - \u003e Creates a new edit for the provided input, instruction, and parameters.\n  - https://platform.openai.com/docs/api-reference/images\n    - \u003e Images: Given a prompt and/or an input image, the model will generate a new image.\n    - https://platform.openai.com/docs/api-reference/images/create\n      - `POST https://api.openai.com/v1/images/generations`\n      - \u003e Creates an image given a prompt.\n    - https://platform.openai.com/docs/api-reference/images/create-edit\n      - `POST https://api.openai.com/v1/images/edits`\n      - \u003e Creates an edited or extended image given an original image and a prompt.\n    - https://platform.openai.com/docs/api-reference/images/create-variation\n      - `POST https://api.openai.com/v1/images/variations`\n      - \u003e Creates a variation of a given image.\n  - https://platform.openai.com/docs/api-reference/embeddings\n    - \u003e Embeddings: Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.\n    - https://platform.openai.com/docs/api-reference/embeddings/create\n      - `POST https://api.openai.com/v1/embeddings`\n      - \u003e Creates an embedding vector representing the input text.\n  - https://platform.openai.com/docs/api-reference/files\n    - \u003e Files: Files are used to upload documents that can be used with features like Fine-tuning.\n  - https://platform.openai.com/docs/api-reference/fine-tunes\n    - \u003e Fine-tunes: Manage fine-tuning jobs to tailor a model to your specific training data.\n  - https://platform.openai.com/docs/api-reference/moderations\n    - \u003e Moderations: Given a input text, outputs if the model classifies it as violating OpenAI's content policy.\n- https://github.com/acheong08/ChatGPT#official-api-browserless\n  - https://github.com/acheong08/ChatGPT/wiki/revChatGPT\n  - https://github.com/acheong08/ChatGPT/blob/main/src/revChatGPT/Official.py#L13\n    - `text-chat-davinci-002-20230126`\n","funding_links":["https://github.com/sponsors/0xdevalias","https://ko-fi.com/devalias","https://buymeacoff.ee/devalias"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xdevalias%2Fpoc-chatgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xdevalias%2Fpoc-chatgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xdevalias%2Fpoc-chatgpt/lists"}