{"id":29120081,"url":"https://github.com/elew-dev/olive","last_synced_at":"2026-02-02T08:03:34.254Z","repository":{"id":299160728,"uuid":"1002225037","full_name":"ELew-Dev/olive","owner":"ELew-Dev","description":"Lightweight AI helper bot built with Python and OpenAI API for customer support.","archived":false,"fork":false,"pushed_at":"2025-06-16T01:25:52.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-29T14:42:48.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ELew-Dev.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-06-15T01:50:18.000Z","updated_at":"2025-06-16T01:25:56.000Z","dependencies_parsed_at":"2025-06-15T03:33:35.384Z","dependency_job_id":"eecec88f-414d-4b2d-9795-42e562e2d5ee","html_url":"https://github.com/ELew-Dev/olive","commit_stats":null,"previous_names":["elew-dev/olive"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ELew-Dev/olive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Folive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Folive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Folive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Folive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ELew-Dev","download_url":"https://codeload.github.com/ELew-Dev/olive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELew-Dev%2Folive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29007384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T06:37:10.400Z","status":"ssl_error","status_checked_at":"2026-02-02T06:37:09.383Z","response_time":58,"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":[],"created_at":"2025-06-29T14:37:26.880Z","updated_at":"2026-02-02T08:03:34.210Z","avatar_url":"https://github.com/ELew-Dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🫒 Olive – Friendly AI Support Assistant\n\nOlive is an AI-powered helper designed to make support teams faster, calmer, and more efficient. It classifies customer messages and drafts smart, friendly replies in real time.\n\n**Built with:**\n\n  * **🧠 OpenAI GPT:** The powerful language model behind Olive's intelligence.\n  * **🖼️ Streamlit interface:** For a clean, interactive web application.\n  * **💬 Clean UX:** Designed for support agents to easily input messages and get responses.\n\n-----\n\n## 🚀 Getting Started\n\nFollow these steps to get Olive up and running on your local machine.\n\n### 1\\. Clone the Repository \u0026 Navigate\n\nFirst, get a copy of the project and move into its directory:\n\n```bash\ngit clone https://github.com/your-username/olive.git\ncd olive\n```\n\n### 2\\. Create and Activate a Virtual Environment\n\nIt's highly recommended to use a virtual environment to manage project dependencies.\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate   # On macOS/Linux\n# venv\\Scripts\\activate    # On Windows\n```\n\n### 3\\. Install Requirements\n\nInstall all necessary Python packages within your activated virtual environment:\n\n```bash\npip install -r requirements.txt\n```\n\n### 4\\. OpenAI API Key Configuration\n\nOlive requires an OpenAI API key to access its language models.\n\n  * **Obtain Your API Key:**\n\n    1.  Go to the OpenAI API Keys page: [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys)\n    2.  Log in to your OpenAI account.\n    3.  Click **\"Create new secret key\"**. Give it a descriptive name (e.g., \"Olive App Key\").\n    4.  **Immediately copy the *entire* key\\!** It will only be shown once. It will start with `sk-` or `sk-proj-`.\n\n  * **Create or Update `.env` File:**\n\n    1.  In the root of your `olive` project directory, create a new file named **`.env`** (note the leading dot, this makes it a hidden file).\n\n    2.  Add the following line to your `.env` file, replacing `\u003cYOUR_OPENAI_API_KEY\u003e` with the key you just copied:\n\n        ```dotenv\n        OPENAI_API_KEY=sk-your_brand_new_secret_key_here\n        ```\n\n          * **Important:** Ensure there are no spaces around the `=` sign or at the end of the key.\n\n  * **Verify `.env` Loading (Optional but Recommended):**\n    You can use the `check_env.py` script to confirm your `.env` file is being read correctly:\n\n    ```bash\n    (venv) your_username@your_machine olive % python3 check_env.py\n    ```\n\n    Expected Output: `API key loaded: sk-xxxxx***********************xxxx`\n\n### 5\\. Run the Application\n\nWith your virtual environment active and `.env` configured, you can launch the Streamlit app:\n\n```bash\nstreamlit run app.py\n```\n\nThis will open the Olive AI Assistant in your web browser.\n\n-----\n\n## 🧠 What Olive Does\n\n  * **✅ Classifies Customer Message Intent:** Olive can detect the core purpose of a customer message (e.g., Cancel, Reschedule, Complaint, Compliment, General Question).\n  * **✨ Generates Thoughtful Replies:** Based on the detected intent and the original message, Olive crafts a friendly and natural language response.\n  * **🔁 Easily Extendable:** The core logic is designed to be easily extended for more advanced features like automated tagging, intelligent message routing, or integration into real-time support systems.\n\n-----\n\n## 📂 Project Structure\n\n```\nolive/\n ├── app.py               # Streamlit UI for user input and output\n ├── olive.py             # Core AI logic: intent classification \u0026 response generation\n ├── .env                 # Environment variables (e.g., OpenAI API key - crucial for security!)\n ├── .gitignore           # Git ignore rules (prevents sensitive files like .env from being committed)\n ├── requirements.txt     # Python dependencies\n ├── README.md            # This file\n ├── check_env.py         # Utility script to verify .env file loading (useful for debugging)\n └── examples/\n     └── sample_inputs.md # Example customer messages for testing\n```\n\n-----\n\n## 🛠️ Troubleshooting Common Issues\n\nEncountering problems? Here are solutions to the most common issues:\n\n### Error: `401 - Incorrect API key provided`\n\n**Problem:** The OpenAI API is rejecting the API key being sent. This means the key is invalid, expired, revoked, or incorrectly formatted/loaded. Even if `check_env.py` shows it loaded, the API itself isn't accepting it.\n\n**Solution:**\n\n1.  **Generate a NEW API Key:** Go back to [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys) and create a brand new secret key. Copy it immediately.\n2.  **Update `.env`:** Open your `.env` file and *replace* the existing `OPENAI_API_KEY` value with this **new, freshly copied key**. Save the file.\n3.  **Full Restart:**\n      * Stop the Streamlit app (`Ctrl + C` in your terminal).\n      * Deactivate your virtual environment (`deactivate`).\n      * Reactivate your virtual environment (`source venv/bin/activate`).\n      * Run `streamlit run app.py` again.\n4.  **Verify `olive.py`:** Ensure `load_dotenv()` is called at the very top of `olive.py` and that the OpenAI client is initialized like `client = openai.OpenAI(api_key=api_key)`.\n\n### Error: `429 - You exceeded your current quota`\n\n**Problem:** Your API key is valid and connected to OpenAI, but your account has run out of free credits or has reached its spending limit. This is a billing-related issue.\n\n**Solution:**\n\n1.  **Check OpenAI Usage/Billing:** Visit [https://platform.openai.com/usage](https://platform.openai.com/usage) and review your current usage and available credit.\n2.  **Add Payment Information/Credits:** If necessary, add a payment method or purchase more credits directly on the OpenAI platform to continue using the API.\n\n-----\n\n## 🙌 Why \"Olive\"?\n\nBecause this AI bot is simple, warm, and always ready to help — just like a good olive oil drizzle. 🍽️","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felew-dev%2Folive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felew-dev%2Folive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felew-dev%2Folive/lists"}