Skip to content

hansipie/AssistantsGPTMngt

Repository files navigation


AssistantsGPTMngt

◦ Gain control on your assistants

◦ Developed with the software and tools below.

Streamlit OpenAI Python

GitHub license git-last-commit GitHub commit activity GitHub top language

📖 Table of Contents


📍 Overview

AssistantsGPTMngt is a code repository containing an Assistants Management application. It uses Streamlit library to create a web-based interface, allowing users to input their OpenAI API key and manage their assistants. The app displays existing assistants in a tabular format, allowing users to select assistants for deletion. It provides a user-friendly way to manage and delete assistants using the OpenAI library.


📦 Features

Feature Description
⚙️ Architecture The codebase follows a simple architecture with a single file, assistants.py, which serves as the main entry point for the application. It uses the Streamlit library to create a web-based interface. The codebase implements a basic client-server architecture, where the user interacts with the application through the web interface served by Streamlit, and the server-side logic is handled by the code in assistants.py.
📄 Documentation The codebase is lacking comprehensive documentation. Although there are code summaries for the assistants.py and requirements.txt files, there is no separate documentation file or detailed comments within the codebase. Adding more detailed explanations, function and class-level comments, and a separate README file would greatly improve the comprehensiveness of the documentation.
🔗 Dependencies The codebase has a few external dependencies, including the Python programming language itself, as well as the Streamlit, streamlit-file-browser, and openai libraries. The requirements.txt file specifies these dependencies and can be used to easily install all the required libraries for running the application.
🧩 Modularity The codebase is organized into a single file, assistants.py, which contains all the logic for the application. However, the code can be further modularized by separating different functionalities into separate modules or classes. This would improve code maintainability and reusability.
🧪 Testing The codebase does not have any explicit testing strategies or tools implemented. Adding unit tests, integration tests, and possibly automated testing tools like pytest or unittest would greatly improve the overall quality and robustness of the codebase.
⚡️ Performance The performance of the system depends on the efficiency of the Streamlit framework and the response times of the OpenAI API. The codebase itself does not have any specific performance optimizations. Considering the code's simplicity and the fact that it primarily relies on external services, the performance should be sufficient for its intended use.
🔐 Security The codebase does not implement any specific measures to protect data or ensure security. It relies on the user to input their OpenAI API key, and there is a warning message if the key is not provided. However, implementing authentication, encryption, and other security measures would be essential if the codebase were to be deployed in a production environment.
🔀 Version Control It appears that the codebase is using version control, as it is hosted on GitHub. However, there is no specific information provided about the version control strategies or tools used. Adding information about the branching model, commit conventions, and deployment processes would greatly improve the version control practices.
🔌 Integrations The codebase integrates with the OpenAI API to retrieve a list of existing assistants. It also uses the Streamlit library to create a web-based interface for user interaction. The codebase does not have any explicit integrations with other systems or services.
📶 Scalability The codebase does not implement

📂 Repository Structure

└── AssistantsGPTMngt/
    ├── pages/
    |   └── orphans.py
    ├── assistant.py
    └── requirements.txt

⚙️ Modules

Root
File Summary
requirements.txt The code in the "requirements.txt" file specifies the dependencies needed for the app in the AssistantsGPTMngt directory to run. These dependencies include "streamlit," "streamlit-file-browser," and "openai.
assistants.py The code above is for an Assistants Management application. It uses the Streamlit library to create a web-based interface. It allows the user to input their OpenAI API key and provides a sidebar with a reload button. If the API key is not provided, a warning message is displayed and the program stops. It then uses the OpenAI library to retrieve a list of existing assistants and displays them in a tabular format. The user can select assistants for deletion using checkboxes and click a button to delete the selected assistants.

🚀 Getting Started

Dependencies

Please ensure you have the following dependencies installed on your system:

- ℹ️ python 3.10

- ℹ️ python module: streamlit

- ℹ️ python module: openai

🔧 Installation

  1. Clone the AssistantsGPTMngt repository:
► git clone https://github.com/hansipie/AssistantsGPTMngt
  1. Change to the project directory:
cd AssistantsGPTMngt
  1. Create the secret file containing your OpenAI API key (optionnal)
echo "OPENAI_API_KEY = \"sk-******\"" >> .streamlit/secrets.toml

Note

  • NB: This simply set the environment variable at streamlit's runtime. It the API key is not provided as described here, the environment variable will have to be set manually:

    On Linux/MacOS

    export OPENAI_API_KEY=YOUR_API_KEY
    

    On Windows

    set OPENAI_API_KEY=YOUR_API_KEY
    
  • NB2: If the API key is not provided in the environment it will have to be set in the UI

  1. Install the dependencies:
► pip install -r requirements.txt

🤖 Running AssistantsGPTMngt

From CLI

► streamlit run assistants.py

Using Docker

► docker compose up

Using Streamlit

Try AssistantGPTMngt in your browser, no installation required!

Streamlit App

Note

Hosted on Streamlit's Community Cloud. It may be unstable or unavailable at times.


🤝 Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines

Click to expand
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a Git client.
    git clone <your-forked-repo-url>
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear and concise message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.

Once your PR is reviewed and approved, it will be merged into the main branch.


📄 License

This project is protected under the MIT License. For more details, refer to the LICENSE file.


👏 Acknowledgments

  • List any resources, contributors, inspiration, etc. here.

Return


About

UI to manage GPT Assistants

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published