{"id":13456810,"url":"https://github.com/peterw/Chat-with-Github-Repo","last_synced_at":"2025-03-24T11:31:25.231Z","repository":{"id":154890676,"uuid":"632246730","full_name":"peterw/Chat-with-Github-Repo","owner":"peterw","description":"This repository contains two Python scripts that demonstrate how to create a chatbot using Streamlit, OpenAI GPT-3.5-turbo, and Activeloop's Deep Lake.","archived":false,"fork":false,"pushed_at":"2024-05-20T03:44:27.000Z","size":32,"stargazers_count":1151,"open_issues_count":20,"forks_count":168,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-03-18T07:11:20.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://explodinginsights.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-04-25T02:41:24.000Z","updated_at":"2025-03-09T14:08:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc153688-f65f-4f42-bda4-3242e82dd660","html_url":"https://github.com/peterw/Chat-with-Github-Repo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterw%2FChat-with-Github-Repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterw%2FChat-with-Github-Repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterw%2FChat-with-Github-Repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterw%2FChat-with-Github-Repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterw","download_url":"https://codeload.github.com/peterw/Chat-with-Github-Repo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245260874,"owners_count":20586490,"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":"2024-07-31T08:01:28.192Z","updated_at":"2025-03-24T11:31:24.930Z","avatar_url":"https://github.com/peterw.png","language":"Python","funding_links":[],"categories":["Python","HarmonyOS","A01_文本生成_文本对话"],"sub_categories":["Windows Manager","大语言对话模型及数据"],"readme":"# Chat-with-Github-Repo\n\nThis repository contains Python scripts that demonstrate how to create a chatbot using Streamlit, OpenAI GPT-3.5-turbo, and Activeloop's Deep Lake.\n\nThe chatbot searches a dataset stored in Deep Lake to find relevant information from any Git repository and generates responses based on the user's input.\n\n## Files\n\n- `src/utils/process.py`: This script clones a Git repository, processes the text documents, computes embeddings using OpenAIEmbeddings, and stores the embeddings in a DeepLake instance.\n\n- `src/utils/chat.py`: This script creates a Streamlit web application that interacts with the user and the DeepLake instance to generate chatbot responses using OpenAI GPT-3.5-turbo.\n\n- `src/main.py`: This script contains the command line interface (CLI) that allows you to run the chatbot application.\n\n## Setup\n\nBefore getting started, be sure to sign up for an [Activeloop](https://www.activeloop.ai/) and [OpenAI](https://openai.com/) account and create API keys.\n\nTo set up and run this project, follow these steps:\n\n1. Clone the repository and navigate to the project directory:\n\n```bash\ngit clone https://github.com/peterw/Chat-with-Git-Repo.git\ncd Chat-with-Git-Repo\n```\n\n2. Install the required packages with `pip`:\n\n```bash\npip install -r requirements.txt\n```\n\nFor development dependencies, you can install them using the following command:\n\n```bash\npip install -r dev-requirements.txt\n```\n\n3. Set the environment variables:\n\nCopy the `.env.example` file:\n\n```bash\ncp .env.example .env\n```\n\nProvide your API keys and username:\n\n```\nOPENAI_API_KEY=your_openai_api_key\nACTIVELOOP_TOKEN=your_activeloop_api_token\nACTIVELOOP_USERNAME=your_activeloop_username\n```\n\n4. Use the CLI to run the chatbot application. You can either process a Git repository or start the chat application using an existing dataset.\n\n\u003e For complete CLI instructions run `python src/main.py --help`\n\nTo process a Git repository, use the `process` subcommand:\n\n```bash\npython src/main.py process --repo-url https://github.com/username/repo_name\n```\n\nYou can also specify additional options, such as file extensions to include while processing the repository, the name for the Activeloop dataset, or the destination to clone the repository:\n\n```bash\npython src/main.py process --repo-url https://github.com/username/repo_name --include-file-extensions .md .txt --activeloop-dataset-name my-dataset --repo-destination repos\n```\n\nTo start the chat application using an existing dataset, use the `chat` subcommand:\n\n```bash\npython src/main.py chat --activeloop-dataset-name my-dataset\n```\n\nThe Streamlit chat app will run, and you can interact with the chatbot at `http://localhost:8501` (or the next available port) to ask questions about the repository.\n\n## Sponsors\n\n✨ Find profitable ideas faster: [Exploding Insights](https://explodinginsights.com/)\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterw%2FChat-with-Github-Repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterw%2FChat-with-Github-Repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterw%2FChat-with-Github-Repo/lists"}