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 .envto create the env file - Fill out the
.envfile 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.tsand change the second argument sent tocompleteShoppingAssistant - To tweak the user preferences, edit
src/index.tsand change the third argument sent tocompleteShoppingAssistantto include/exclude preferences
This example is built with openAI and as such uses the built-in trackOpenAiMetrics() method to track the completion.