This application returns a list of products that match a user's preferences. It includes implementation with AI Configs against OpenAI.
- Clone the repo
- Run
yarn
- Run
cp .env.example .env
to create the env file - Fill out the
.env
file with your LaunchDarkly and OpenAI credentials - Run
yarn start
- Open the browser and navigate to
http://localhost:3008
Endpoint is on /
and will return a list of products that match the user's preferences defined in src/index.ts
.
- To change the prompt that is getting sent by the user, edit
src/index.ts
and change the second argument sent tocompleteShoppingAssistant
- To tweak the user preferences, edit
src/index.ts
and change the third argument sent tocompleteShoppingAssistant
to include/exclude preferences
This example is built with openAI and as such uses the built-in trackOpenAiMetrics()
method to track the completion.