{"id":18995673,"url":"https://github.com/gauravkaklotar/openai_integration","last_synced_at":"2026-05-15T11:35:08.794Z","repository":{"id":261037485,"uuid":"883062812","full_name":"GauravKaklotar/OpenAI_Integration","owner":"GauravKaklotar","description":"OpenAI Weather Chatbot","archived":false,"fork":false,"pushed_at":"2024-11-04T10:26:17.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T12:18:28.568Z","etag":null,"topics":["flask","function-call","openai-api","python3","streaming"],"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/GauravKaklotar.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}},"created_at":"2024-11-04T10:08:42.000Z","updated_at":"2024-11-04T13:10:56.000Z","dependencies_parsed_at":"2024-11-04T11:38:47.040Z","dependency_job_id":null,"html_url":"https://github.com/GauravKaklotar/OpenAI_Integration","commit_stats":null,"previous_names":["gauravkaklotar/openai_integration"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GauravKaklotar/OpenAI_Integration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauravKaklotar%2FOpenAI_Integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauravKaklotar%2FOpenAI_Integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauravKaklotar%2FOpenAI_Integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauravKaklotar%2FOpenAI_Integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GauravKaklotar","download_url":"https://codeload.github.com/GauravKaklotar/OpenAI_Integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauravKaklotar%2FOpenAI_Integration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33065595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"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":["flask","function-call","openai-api","python3","streaming"],"created_at":"2024-11-08T17:32:18.927Z","updated_at":"2026-05-15T11:35:08.764Z","avatar_url":"https://github.com/GauravKaklotar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAI Weather Chatbot\n\nThis project demonstrates a chatbot that interacts with OpenAI's API to provide weather information based on user queries. It utilizes OpenAI's `gpt-3.5-turbo` model, custom function calling, and streaming to create a responsive and accurate chatbot for weather inquiries.\n\n## Features\n\n- **Function Calling**: The chatbot recognizes when a user asks for weather information and calls a custom function, `get_weather`, to retrieve the requested data.\n- **Streaming**: The chatbot uses streaming to send partial responses as they are generated, creating a real-time interaction experience.\n- **Error Handling**: Includes checks for missing function calls or incomplete arguments to prevent crashes and ensure a smooth user experience.\n\n## Prerequisites\n\n- **Python 3.10+**\n\n## Project Structure\n\n```plaintext\n├── helpers\n│   └── openai_helper.py   # Contains helper functions and the core chatbot functionality\n├── routes\n│   └── api_routes.py      # Flask routes for API endpoints\n├── app.py                 # Main entry point for running the Flask server\n└── README.md              # Project documentation\n```\n\n## Installation\n\n### Steps\n\n1. **Clone the Repository**\n   Clone this repository to your local machine using the following command:\n   ```bash\n   git clone https://github.com/GauravKaklotar/OpenAI_Integration.git\n   cd OpenAI_Integration\n   ```\n\n2. **Create a Virtual Environment**\n   Create a new virtual environment for your project using the following command:\n   ```bash\n   python -m venv venv\n   ```\n\n3. **Activate the Virtual Environment**\n   Activate the virtual environment using the following command:\n\n   **For Windows**\n   ```bash\n   venv\\Scripts\\activate\n   ```\n\n   **For Unix/Linux/MacOS**\n   ```bash\n   source venv/bin/activate\n   ```\n\n4. **Install Requirements**\n   Install the required dependencies using the following command:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n5. **Create a .env File**\n   Create a new file named `.env` in the root directory of your project and add the following line:\n   ```makefile\n   OPENAI_API_KEY=your-openai-api-key\n   ```\n   Replace `your-openai-api-key` with your actual OpenAI API key.\n\n6. **Run the Flask App**\n   Run the Flask application using the following command:\n   ```bash\n   python app.py\n   ```\n   Your Flask app should now be running, and you can access it in your web browser at `http://127.0.0.1:5000`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgauravkaklotar%2Fopenai_integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgauravkaklotar%2Fopenai_integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgauravkaklotar%2Fopenai_integration/lists"}