- This project is a Chat Code-Interpreter application built using OpenAI's GPT-3.5-turbo model for natural language understanding and generation. The application provides a chat interface where users can upload CSV files and execute Python code on the data within those files. The UI is developed using Chainlit, a lightweight Python library for creating interactive chat interfaces.
- Chat Interface: Users interact with the application through a text-based chat interface.
- File Upload: Users can upload CSV files, which are then processed by the application.
- Python Code Execution: Users can enter Python code snippets to manipulate the uploaded CSV data.
- Output Display: The application displays the output generated by executing the user-provided Python code.
- OpenAI API: Utilized for natural language understanding and generation.
- Chainlit: Used for creating the chat interface.
- Python: The backend logic of the application is implemented in Python.
- Pandas: Utilized for handling CSV data.
- python-dotenv: Used for loading environment variables.
- Clone this repository to your local machine.
- Install the required dependencies using pip:
pip install -r requirements.txt
- Create a .env file in the root directory of the project.
- Add your OpenAI API key to the .env file:
OPENAI_API_KEY=<your-api-key>
- Run the application using the following command:
chainlit run app.py
- The application will start and provide a URL where you can access the chat interface.
- Upon accessing the chat interface, you can begin by uploading a CSV file.
- Once the file is uploaded, you can enter Python code snippets to manipulate the data.
- The application will execute the code and display the output in the chat interface.
- This application is built using OpenAI's GPT-3.5-turbo model and does not rely on any pre-built assistants or frameworks.
- All code execution and interaction are handled through custom Python code, leveraging OpenAI's completions/chat APIs directly.
No License.