{"id":19792977,"url":"https://github.com/hit07/fitgpt-hacksc","last_synced_at":"2025-02-28T09:48:51.102Z","repository":{"id":262321548,"uuid":"886018880","full_name":"Hit07/FitGPT-HackSc","owner":"Hit07","description":"AI-Powered Fitness Coach; 🥈 Runner up at HackSC's SoCal Tech Week hackathon","archived":false,"fork":false,"pushed_at":"2024-11-11T21:28:39.000Z","size":319,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T04:32:56.242Z","etag":null,"topics":["data","elasticsearch","gpt-4o-mini","llm","pipeline"],"latest_commit_sha":null,"homepage":"https://devpost.com/software/fitgpt","language":"Jupyter Notebook","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/Hit07.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-10T01:03:26.000Z","updated_at":"2024-12-28T02:15:31.000Z","dependencies_parsed_at":"2024-11-11T20:38:23.077Z","dependency_job_id":null,"html_url":"https://github.com/Hit07/FitGPT-HackSc","commit_stats":null,"previous_names":["hit07/fitgpt-hacksc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hit07%2FFitGPT-HackSc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hit07%2FFitGPT-HackSc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hit07%2FFitGPT-HackSc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hit07%2FFitGPT-HackSc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hit07","download_url":"https://codeload.github.com/Hit07/FitGPT-HackSc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241133050,"owners_count":19915319,"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":["data","elasticsearch","gpt-4o-mini","llm","pipeline"],"created_at":"2024-11-12T07:08:30.464Z","updated_at":"2025-02-28T09:48:51.083Z","avatar_url":"https://github.com/Hit07.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FitGPT Backend\n\n### Files\n**chat_client.py**: Main Flask application that handles API requests and integrates with OpenAI's GPT model.\n**exercise_module.py**: Module for processing exercise data, including querying the OpenSearch database for exercise details.\n**lambda_function.py**: AWS Lambda function that aggregates data from Hevy API and Apple Health, then pushes it to Firebase.\n**prompt_string.py**: Generates the prompt for the GPT model based on user data and exercise history.\n\n### Setup\n- Install dependencies:\n```\npip install -r requirements.txt\n```\n\n### Set up environment variables:\n- ```API_KEY```: Your OpenAI API key\n- ```OPENSEARCH_ENDPOINT```: URL for your OpenSearch instance\n- ```USERNAME and PASSWORD```: Credentials for OpenSearch\nFirebase and Hevy API credentials (see lambda_function.py)\nEnsure you have access to the required APIs and databases: \n1. OpenAI GPT-4\n2. OpenSearch\n3. Firebase Realtime Database\n4. Hevy API\n\n### API Endpoints\n- /api/heart-data (POST): Main endpoint for generating workout recommendations\n- /test (GET): Test route to check if the server is running\n\n### Data Flow\n* User health data is sent to AWS Lambda\n* Lambda fetches workout data from Hevy API\n* Data is aggregated and stored in Firebase\n* When a recommendation is requested, data is fetched from Firebase\n* Data is processed and sent to OpenAI's GPT model\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhit07%2Ffitgpt-hacksc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhit07%2Ffitgpt-hacksc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhit07%2Ffitgpt-hacksc/lists"}