{"id":28473983,"url":"https://github.com/samet404/gemini-chroma","last_synced_at":"2025-07-02T08:31:19.522Z","repository":{"id":283671874,"uuid":"952532087","full_name":"samet404/gemini-chroma","owner":"samet404","description":"Self-contained example of how to add your custom documents to gemini","archived":false,"fork":false,"pushed_at":"2025-04-03T20:21:48.000Z","size":138,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T12:46:11.466Z","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/samet404.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-03-21T12:43:01.000Z","updated_at":"2025-04-03T20:21:52.000Z","dependencies_parsed_at":"2025-04-08T10:49:55.263Z","dependency_job_id":"f7bc7b31-6fe4-4189-a129-2506dc8d2c74","html_url":"https://github.com/samet404/gemini-chroma","commit_stats":null,"previous_names":["404nnotfoundddd/gemini-chroma","sametalpdeger/gemini-chroma","alya50/gemini-chroma","samet404/gemini-chroma"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samet404/gemini-chroma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samet404%2Fgemini-chroma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samet404%2Fgemini-chroma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samet404%2Fgemini-chroma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samet404%2Fgemini-chroma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samet404","download_url":"https://codeload.github.com/samet404/gemini-chroma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samet404%2Fgemini-chroma/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263102537,"owners_count":23414122,"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":[],"created_at":"2025-06-07T12:39:35.604Z","updated_at":"2025-07-02T08:31:19.508Z","avatar_url":"https://github.com/samet404.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat with your documents\n\nThis project contains a (very) minimal, self-contained example of how to add your custom documents to gemini to extend\nits knowledge base, using Chroma and Google Gemini's API.\nIt uses fictional hybird car article as example document.\n\n## How it works\n\nThe basic flow is as follows:\n\n0. The text documents in the `documents` folder are loaded line by line, then embedded and stored in a Chroma\n   collection.\n\n1. When the user submits a question, it gets embedded using the same model as the documents, and the lines most relevant\n   to the query are retrieved by Chroma.\n2. The user-submitted question is passed to Google Gemini's API, along with the extra context retrieved by Chroma. The\n   Google Gemini API generates a response.\n3. The response is displayed to the user, along with the lines used as extra context.\n\n## Running the example\n\nYou will need a Gemini API key to run this demo.\n\nInstall dependencies and run the example:\n\n```bash\n# 1- Install dependencies\npip install -r requirements.txt\n\n# 2- Load the example documents into Chroma\npython load_data.py\n\n# 3- Set your GEMINI_API_KEY environment variable to .env\n\n# 4- Run gemini\npython main.py\n```\n\nExample output:\n\n```\nQuery: What is starlight queen?\n\nThinking...\n\nBased on the information provided, \"Starlight Queen\" refers to a hybrid vehicle. It is the latest offering from Stellar Motors. It's described as a luxurious and fuel-efficient hybrid with a smooth ride and responsive handling. It is considered a premium vehicle due to its high price tag.\n\n\n\nSource documents:\nStarlightQueen.md: line 19\nStarlightQueen.md: line 33\nStarlightQueen.md: line 1\nStarlightQueen.md: line 31\nStarlightQueen.md: line 5\n```\n\nYou can replace the example text documents in the `documents` folder with your own documents, and the chatbot will use\nthose instead.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamet404%2Fgemini-chroma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamet404%2Fgemini-chroma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamet404%2Fgemini-chroma/lists"}