Skip to content

Simple scripts for GPT-4o Mini using OpenAI API, LangChain and LlamaIndex.

License

Notifications You must be signed in to change notification settings

krisograbek/gpt4o-mini-basic-scripts

Repository files navigation

About the repository

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)

Prepare the Python virtual environmnent.

  1. Create project folder.
mkdir folder-name
cd folder-name
  1. Create OpenAI API key.

Go to OpenAI platform.

And create OpenAI API key

  1. 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
  1. Install the necessary Python packages:
pip install -r requirements.txt

Or

pip install openai langchain lanchain-openai llama-index python-dotenv
  1. Paste you OpenAI API key to the .env file:
OPENAI_API_KEY=your_openai_api_key_here

About

Simple scripts for GPT-4o Mini using OpenAI API, LangChain and LlamaIndex.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages