{"id":28138499,"url":"https://github.com/thissayantan/gpt-api","last_synced_at":"2026-05-01T12:31:49.112Z","repository":{"id":208418787,"uuid":"721597773","full_name":"thissayantan/gpt-api","owner":"thissayantan","description":"A FastAPI server app for AI conversations with OpenAI API 🤖💬. Secure, efficient, and ready for integration! 🚀🔐","archived":false,"fork":false,"pushed_at":"2023-11-25T20:18:20.000Z","size":44,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-15T17:06:41.746Z","etag":null,"topics":["chatbot","conversational-ai","fastapi","openai","openai-api","openai-assistant-api","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/thissayantan.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-21T11:46:36.000Z","updated_at":"2025-04-19T07:58:50.000Z","dependencies_parsed_at":"2025-10-15T18:42:41.266Z","dependency_job_id":"e77fc484-8d11-4bf1-9765-a41027baf922","html_url":"https://github.com/thissayantan/gpt-api","commit_stats":null,"previous_names":["thissayantan/gpt-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thissayantan/gpt-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thissayantan%2Fgpt-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thissayantan%2Fgpt-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thissayantan%2Fgpt-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thissayantan%2Fgpt-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thissayantan","download_url":"https://codeload.github.com/thissayantan/gpt-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thissayantan%2Fgpt-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32497810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chatbot","conversational-ai","fastapi","openai","openai-api","openai-assistant-api","python"],"created_at":"2025-05-14T17:14:24.157Z","updated_at":"2026-05-01T12:31:49.040Z","avatar_url":"https://github.com/thissayantan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPT-API\n\nThis project integrates the OpenAI API with a FastAPI server to create a conversational AI system. It utilizes environment variables for API keys and includes routes for starting conversations and chatting with the AI.\n\n## Installation\n\nBefore you start, make sure you have Python installed on your system.\n\n1. Clone the repository:\n\n```bash\ngit clone git@github.com:thissayantan/gpt-api.git\n```\n\n2. Navigate to the cloned directory:\n\n```bash\ncd gpt-api\n```\n\n3. Install the required packages:\n\n```bash\npoetry install\n```\n\n## Configuration\n\nCreate a `.env` file in the root of the project and set the `OPENAI_API_KEY` variable:\n\n```env\nOPENAI_API_KEY='your-openai-api-key'\n```\n\n## Running the Server\n\nStart the FastAPI server with:\n\n```bash\nuvicorn main:app --reload\n```\n\nThe `--reload` flag enables hot reloading during development.\n\n## Usage\n\nOnce the server is running, you can interact with the API as follows:\n\n- Send a GET request to the root (`/`) to verify that the server is running.\n- Start a conversation with a GET request to `/start`. This will return a `thread_id`.\n- Use the `thread_id` to chat with the AI by sending a POST request to `/chat` with a `DialogueSnippet` JSON object.\n\n## Endpoints\n\n- `GET /`: Root route that returns a welcome message.\n- `GET /start`: Starts a new conversation thread with the AI.\n- `POST /chat`: Sends a user's message to the AI and returns its response.\n\n## Debugging\n\nThe code includes print statements for debugging purposes. These will show up in your terminal as you interact with the API.\n\n## License\n\nThis project is licensed under MIT License. For more information, please see the [LICENSE](https://github.com/thissayantan/gpt-api/blob/main/LICENSE) file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthissayantan%2Fgpt-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthissayantan%2Fgpt-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthissayantan%2Fgpt-api/lists"}