Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

OpenAI Example (Single Provider)

This example demonstrates how to use LaunchDarkly's AI Config with the OpenAI provider.

Prerequisites

Setup

  1. Create the following config in your LaunchDarkly project. You can use a different key by setting the environment variable in your .env.

    • Create an AI Config with an OpenAI model (e.g. gpt-4) and a system message. Default key: sample-completion.
  2. Copy .env.example to .env and fill in your keys:

    cp .env.example .env
  3. Install the required dependencies:

    poetry install

Run

poetry run openai