{"id":22432690,"url":"https://github.com/1999azzar/stability_chat_bot","last_synced_at":"2025-03-27T07:42:48.836Z","repository":{"id":228262663,"uuid":"773512506","full_name":"1999AZZAR/stability_chat_bot","owner":"1999AZZAR","description":" \"Flask app with chat bot \u0026 image generation. Engage with AI, generate images from text prompts. Easy setup \u0026 customization.\"","archived":false,"fork":false,"pushed_at":"2024-03-26T19:42:45.000Z","size":157,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T12:45:49.023Z","etag":null,"topics":["chatbot","gemini","image-generation","llm","stability-ai"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1999AZZAR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-03-17T21:19:22.000Z","updated_at":"2024-03-23T04:58:47.000Z","dependencies_parsed_at":"2024-03-26T20:49:54.648Z","dependency_job_id":null,"html_url":"https://github.com/1999AZZAR/stability_chat_bot","commit_stats":null,"previous_names":["1999azzar/stability_chat_bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fstability_chat_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fstability_chat_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fstability_chat_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fstability_chat_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1999AZZAR","download_url":"https://codeload.github.com/1999AZZAR/stability_chat_bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806038,"owners_count":20675291,"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":["chatbot","gemini","image-generation","llm","stability-ai"],"created_at":"2024-12-05T22:12:34.983Z","updated_at":"2025-03-27T07:42:48.817Z","avatar_url":"https://github.com/1999AZZAR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stability Chat Bot\n\n**Overview:**\n\nThis Flask application serves as a chat bot interface integrated with an image generation feature. Users can interact with the chat bot, which responds using Gemini AI, a powerful language generation model. Additionally, users can generate images based on text prompts provided to the bot.\n\n**Features:**\n\n- **Chat Bot Interface:** Users can engage in conversations with the chat bot, which operates under the persona of \"Frea,\" a friendly and intelligent AI assistant.\n  \n- **Image Generation:** Users can request the generation of images based on text prompts. The generated images are crafted using the Stability AI API, incorporating the provided prompt to create unique visuals.\n\n- **Image Logging:** The application logs generated images, storing metadata such as filename and creation time in a SQLite database.\n\n- **Security Measures:** The application includes security measures to prevent bot activity detection and incorporates safety settings to filter out harmful content in chat responses.\n\n**Prerequisites:**\n\n- Python 3.x installed on your system.\n- Access to the Stability AI API for image generation.\n- A Google Cloud Platform account with access to the Gemini AI API.\n- Installation of necessary Python packages (specified in `requirements.txt`).\n\n**Setup:**\n\n1. Clone this repository to your local machine.\n2. Install the required Python packages using `pip install -r requirements.txt`.\n3. Obtain API keys for the Stability AI API and the Gemini AI API.\n4. Create a `.env` file in the web directory and add the API keys:\n\n    ```text\n    STABILITY_API_KEY=your_stability_api_key\n    GEMINI_API_KEY=your_gemini_api_key\n    ```\n\n**Usage:**\n\n1. Navigate to the web directory.\n2. Run the Flask application by executing `python app.py` in the terminal.\n3. Access the application in your web browser by navigating to `http://localhost:2500`.\n4. Interact with the chat bot by typing messages in the input field and pressing \"Send\".\n5. To generate an image, start your message with \"imagine\" followed by a prompt (e.g., \"imagine a serene landscape\").\n6. The generated images will be displayed in the chat interface, and metadata will be logged in the database.\n\nBelow is a screenshot of how the application interface may look while running:\n\n![Demo Screenshot](web/example/demo.png)\n\n**Additional Notes:**\n\n- The application includes a mechanism to delete old images from both the filesystem and the database to manage storage efficiently.\n- Customize the chat bot's behavior, appearance, and personality by modifying the `response.py` and `iresponse.py` files.\n- Further enhancements and integrations, such as user authentication and persistent user sessions, can be implemented to extend the application's functionality.\n\n**Contributing:**\n\nContributions to this project are welcome. Please submit pull requests or open issues for any improvements, bug fixes, or feature requests.\n\n**License:**\n\nThis project is licensed under the MIT License. See the `LICENSE` file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fstability_chat_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1999azzar%2Fstability_chat_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fstability_chat_bot/lists"}