This repository provides the scripts for running GPT-4o Mini - the newest OpenAI model.
You'll find the scripts to run it with:
- OpenAI API (requires version 1.36 or higher)
- LlamIndex (requires version 0.10.56 or higher)
- LangChain (requires LangChain version 0.2.10 or higher and langchain-openai version 0.1.17 or higher)
- Create project folder.
mkdir folder-name
cd folder-name
- Create OpenAI API key.
Go to OpenAI platform.
And create OpenAI API key
- Create a virtual environment and activate it:
On macOS and Linux:
python3 -m venv myenv
source myenv/bin/activate
On Windows:
python -m venv myenv
.\myenv\Scripts\activate
3a. Upgrade pip (optional but recommended)
pip install --upgrade pip
- Install the necessary Python packages:
pip install -r requirements.txt
Or
pip install openai langchain lanchain-openai llama-index python-dotenv
- Paste you OpenAI API key to the
.env
file:
OPENAI_API_KEY=your_openai_api_key_here