Skip to content

mingusb/OpenAI_RAG_Chat_With_GitHub_Topic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

💬 OpenAI RAG Chat With GitHub Topic | Build RAG Index & Chat UI for GitHub Topic Repositories

OpenAI API Streamlit UI Language Python License MIT

Create a robust Retrieval-Augmented Generation (RAG) index of large GitHub repositories filtered by topic, and interactively chat with them using OpenAI's file search and a Streamlit interface.

📑 Table of Contents

🚀 Overview

This prototype contains scripts to pull GitHub repositories by topic, render them as HTML, index them using OpenAI's file search (RAG), and interact with them via a Streamlit chat interface.

$ python rendergit-topic.py machine-learning
Rendering repository: tensorflow/tensorflow ...
Rendering repository: pytorch/pytorch ...
$ python openai-file-search.py
Creating RAG index for 2 repositories ...
  • rendergit-topic.py: Takes a GitHub Topic as a CLI argument and calls rendergit on each repo - turning each repo into a potentially large (>100MB) HTML file.
  • openai-file-search.py: Creates a RAG index of all of these files using OpenAI. This can take a substantial amount of time for a large topic.
  • rag-chat-multi.py: A familiar Streamlit chatbot UI. Automatically connects to an OpenAI file search (RAG) ID if available. Supports file uploads, specification of the API key and model selection. Has some quirks.

💻 Installation & Setup

  • Python 3.x
  • OpenAI API Key
  • rendergit tool
  • Required Python libraries: streamlit, openai (and any other dependencies used in the scripts).

Note

Ensure you have an active OpenAI API key with access to file search (Assistants API).

💡 Usage

To use this project, run the scripts in the following order:

  1. Render repositories by topic:
    python rendergit-topic.py <topic>
  2. Create the RAG index:
    python openai-file-search.py
  3. Start the Streamlit chat UI:
    streamlit run rag-chat-multi.py

🐛 Issues & Support

If you encounter any bugs, have feature requests, or need assistance troubleshooting your RAG setup, please open an issue in this repository.

🤝 Contributing

Contributions are always welcome! Whether it's adding new models, optimizing the Streamlit UI, or improving repository parsing, your help is appreciated.

  1. Fork the project.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

📄 License

This project is distributed under the MIT License. See the LICENSE file for more information.

About

Streamlit UI and supporting code to converse with a GitHub Topic(s) using OpenAI. [2025]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages