{"id":25476529,"url":"https://github.com/didibrabosa/chat-openai","last_synced_at":"2026-05-08T13:04:45.289Z","repository":{"id":274865998,"uuid":"924324103","full_name":"didibrabosa/chat-openai","owner":"didibrabosa","description":"Simple FastAPI for interacting with OpenAI's GPT-4. Sends user input to the model and returns AI-generated responses.","archived":false,"fork":false,"pushed_at":"2025-02-05T02:41:24.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T04:03:34.899Z","etag":null,"topics":["dotenv","fastapi","gpt-4","langchain","opeai","uvicorn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/didibrabosa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-01-29T19:53:18.000Z","updated_at":"2025-02-05T02:41:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee301bbf-c2d2-4b5b-ab30-69cf4c25a1cb","html_url":"https://github.com/didibrabosa/chat-openai","commit_stats":null,"previous_names":["didibrabosa/chat-openai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/didibrabosa/chat-openai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didibrabosa%2Fchat-openai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didibrabosa%2Fchat-openai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didibrabosa%2Fchat-openai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didibrabosa%2Fchat-openai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didibrabosa","download_url":"https://codeload.github.com/didibrabosa/chat-openai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didibrabosa%2Fchat-openai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32781579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dotenv","fastapi","gpt-4","langchain","opeai","uvicorn"],"created_at":"2025-02-18T12:57:39.127Z","updated_at":"2026-05-08T13:04:45.281Z","avatar_url":"https://github.com/didibrabosa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI Chat Integration Flask App\n\n## Project Description\n**Talking AI** is a simple API built with **FastAPI** that allows users to interact with an AI-powered chatbot using **OpenAI's GPT-4**. The API receives text input via a **POST** request and returns a response generated by the AI.\n\n## How It Works\n1. Startup Process\n  - Loads the OpenAI API key from an .env file or prompts the user to enter it manually.\n  - Initializes a Flask application with an endpoint for AI interaction.\n2. Query Processing\n  - A POST request is sent to the /talking_ia endpoint with a JSON payload\n  - The system processes the input and sends it to OpenAI's GPT-4.\n  - The AI generates a response, which is returned as JSON.\n\n## Requirements\nInstall dependencies using:\n\n```bash\npip install -r requirements.txt\n```\n\nThe `requirements.txt` file includes:\n  - **FastAPI**: Web framework for the API.\n  - **uvicorn**: ASGI server for FastAPI.\n  - **python-dotenv**: Manages environment variables.\n  - **langchain \u0026 langchain-openai**: Handles interactions with OpenAI models.\n\n## How to Use\n1.Set Up Your API Key:\n  - Create a .env file or set the environment variable OPENAI_API_KEY with your OpenAI API key.\n  - If not set, the application will prompt you to enter the key at startup.\n2. Start the FastAPI application:\n  ```bash\n   uvicorn main:app --reload\n   ```\n3. Send a request to interact with the AI:\n```json\n   {\n     \"text\": \"Your message here\"\n   }\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidibrabosa%2Fchat-openai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidibrabosa%2Fchat-openai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidibrabosa%2Fchat-openai/lists"}