Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szilvia-csernus/openai-assistants-with-code-interpreter
A Jupyter Notebook project, created with the OpenAI Assistants API, utilising the 'code-interpreter' tool.
https://github.com/szilvia-csernus/openai-assistants-with-code-interpreter
jupyter-notebook openai-api openai-assistants openai-code-interpreter
Last synced: 1 day ago
JSON representation
A Jupyter Notebook project, created with the OpenAI Assistants API, utilising the 'code-interpreter' tool.
- Host: GitHub
- URL: https://github.com/szilvia-csernus/openai-assistants-with-code-interpreter
- Owner: szilvia-csernus
- Created: 2024-06-14T08:24:54.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-15T07:26:13.000Z (5 months ago)
- Last Synced: 2024-06-15T08:34:43.221Z (5 months ago)
- Topics: jupyter-notebook, openai-api, openai-assistants, openai-code-interpreter
- Language: Jupyter Notebook
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenAI Assistants API with Code Interpreter
> Notebooks for Maths Tutor and Mortgage Calculator
With the help of the Code Interpreter tool, the assistant can give accurate answers to questions which would be inaccurate by using the Chat Completion GPT on its own. This project shows two examples for this usecase.
---
## How to run this project?
0. Prerequisites:
- Make sure Python3 is installed.
- If you don't have an account with OpenAI, create one here: https://openai.com/ then create a project API key under Dashboard / API keys.1. Clone the project.
2. Create a virtual environment inside the project folder:
`python -m venv venv`
3. Activate the virtual environment:
Mac: `source venv/bin/activate`
Windows: `venv\Scripts\activate`
4. Select interpreter in VSCode:
(on Mac) - Cmd + Shift + P ---> Select Interpreter ---> Select the created `venv` environment
(on Windows) -
5. Install the python dependencies:
`pip install -r requirements.txt`
6. Create an `.env` file in the root folder and add your project's API key:
```
OPENAI_API_KEY=your-unique-opanai-project-key
```7. Run Jupyter Notebook:
`jupyter notebook`
8. In the notebook, run the code snippets in the given/desired order.
## Credits
- OpenAI: https://openai.com