Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Managed Model Example

This example demonstrates how to use LaunchDarkly's managed model functionality (create_model), which handles model creation, chat execution, and optional judge evaluation dispatch automatically.

Prerequisites

  • Python 3.10 or higher
  • Poetry installed
  • A LaunchDarkly account and SDK key
  • API keys for the provider you want to use (OpenAI, Bedrock, or Gemini)

Setup

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

  2. Create a .env file in this directory with the following variables:

    LAUNCHDARKLY_SDK_KEY=your-launchdarkly-sdk-key
    LAUNCHDARKLY_AI_CONFIG_KEY=sample-completion-config
    OPENAI_API_KEY=your-openai-api-key
    
  3. Install the required dependencies:

    poetry install

Run

poetry run managed-model