{"id":25497183,"url":"https://github.com/newstudy2024/gem-ai-client-atai","last_synced_at":"2026-05-10T19:02:54.558Z","repository":{"id":278014988,"uuid":"922900096","full_name":"NewStudy2024/gem-ai-client-atai","owner":"NewStudy2024","description":"Flask, Python, Docker","archived":false,"fork":false,"pushed_at":"2025-02-17T14:09:51.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-17T15:24:08.208Z","etag":null,"topics":["ai","flask","python","sqlite"],"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/NewStudy2024.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":"2025-01-27T09:42:16.000Z","updated_at":"2025-02-17T15:22:04.000Z","dependencies_parsed_at":"2025-02-17T15:34:14.914Z","dependency_job_id":null,"html_url":"https://github.com/NewStudy2024/gem-ai-client-atai","commit_stats":null,"previous_names":["newstudy2024/gem-ai-client-atai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NewStudy2024%2Fgem-ai-client-atai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NewStudy2024%2Fgem-ai-client-atai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NewStudy2024%2Fgem-ai-client-atai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NewStudy2024%2Fgem-ai-client-atai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NewStudy2024","download_url":"https://codeload.github.com/NewStudy2024/gem-ai-client-atai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239576779,"owners_count":19662114,"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":["ai","flask","python","sqlite"],"created_at":"2025-02-19T01:18:37.775Z","updated_at":"2025-11-10T03:30:18.179Z","avatar_url":"https://github.com/NewStudy2024.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask Generative AI API\n\nThis is a Flask-based web application that integrates with Google's Generative AI to process user requests and return responses. It also logs request metrics (response time) into an SQLite database and provides an endpoint to retrieve statistics.\n\n## Features\n\n- **Generative AI Integration**: Uses Google's Generative AI (`gemini-2.0-flash-exp`) to generate responses based on user input.\n- **Request Logging**: Logs response times for each request into an SQLite database.\n- **Metrics Endpoint**: Provides a `/stats` endpoint to retrieve total requests and average response time.\n- **Dashboard**: Includes a `/dashboard` endpoint to visualize metrics using Plotly (requires a template file `dashboard.html`).\n- **Customizable System Instruction**: Allows overriding the default system instruction for the AI model via the `system_instruction` field in the request payload.\n\n## Setup\n\n1. **Clone the repository**\n2. **Add env file**\n   ```\n   GENAI_API_KEY \"Your API key from Gemini\"\n   SYS_INSTRUCTION \"Instructions for AI\"\n   FLASK_HOST \"App IP address\"\n   FLASK_PORT \"App port\"\n   FLASK_DEBUG \"Debuging mode\"\n      \n   #Gunicorn configs\n   GUNICORN_WORKERS=4\n   GUNICORN_BIND=0.0.0.0:5001\n      \n   #Default model\n   DEFAULT_MODEL_NAME=gemini-2.0-flash-exp\n   ```\n3. **Run the docker compose**\n\n        docker compose up\n\nCongrats now you have a Gemini AI API client!!!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewstudy2024%2Fgem-ai-client-atai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnewstudy2024%2Fgem-ai-client-atai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewstudy2024%2Fgem-ai-client-atai/lists"}