This example demonstrates how to use LaunchDarkly's AI Config with the Google Gemini provider.
- Python 3.10 or higher
- Poetry installed
- A LaunchDarkly account and SDK key
- A Google API key
-
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 a Gemini model (e.g.
gemini-2.0-flash) and a system message. Default key:sample-completion.
- Create an AI Config with a Gemini model (e.g.
-
Copy
.env.exampleto.envand fill in your keys:cp .env.example .env
-
Install the required dependencies:
poetry install
poetry run gemini