https://github.com/calapsss/assistants-api-easy
Easy Implementation of Assistants API with Code Interpreter and File Retrieval
https://github.com/calapsss/assistants-api-easy
artificial-intelligence assistants-api openaiapi
Last synced: 12 months ago
JSON representation
Easy Implementation of Assistants API with Code Interpreter and File Retrieval
- Host: GitHub
- URL: https://github.com/calapsss/assistants-api-easy
- Owner: calapsss
- License: mit
- Created: 2023-11-30T07:48:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-09T22:54:40.000Z (over 2 years ago)
- Last Synced: 2023-12-09T23:25:37.873Z (over 2 years ago)
- Topics: artificial-intelligence, assistants-api, openaiapi
- Language: Python
- Homepage: https://youtu.be/ZjpNx8qNnaA
- Size: 67.4 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AI Assistant Application
This application is a Streamlit interface for interacting with OpenAI's AI assistants. It allows users to create assistants, upload files to them, send them messages, and view their responses.
## Get Started
For detailed instructions and a demonstration of AnaLAssist in action, check out my YouTube tutorial:
📺 [Open AI Assistants API Tutorial](https://www.youtube.com/watch?v=ZjpNx8qNnaA)
Here's a high-level overview of what each function does:
- `init()`: Initializes session state variables.
- `set_apikey()`: Allows the user to input their OpenAI API key.
- `config(client)`: Fetches a list of assistants and returns the selected assistant's ID.
- `upload_file(client, assistant_id, uploaded_file)`: Uploads a file to the selected assistant.
- `assistant_handler(client, assistant_id)`: Handles assistant updates, including name, instructions, model, and file management.
- `create_assistant(client)`: Creates a new assistant with a given name, instructions, and model.
- `chat_prompt(client, assistant_option)`: Handles the chat interface, allowing the user to send messages to the assistant and receive responses.
- `chat_display(client)`: Displays the chat history, including any images returned by the assistant.
- `main()`: The main function that runs the Streamlit application. It handles API key input, assistant selection, and chat initiation.
## Installation
1. Clone the repository: `git clone https://github.com/calapsss/assistants-api-easy.git`
2. Navigate to `assistants-api-easy` directory: `cd assistants-api-easy`
3. You can install the package `poetry install`
4. Navigate to frontend folder: `cd frontend`
5. Run with Poetry: `poetry run streamlit run app.py`