Skip to content

Commit eb11847

Browse files
committed
simplify the example and align runtime variable in code and readme
1 parent 41af95d commit eb11847

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

packages/sdk/server-ai/examples/tracked-chat/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,4 @@ This will:
4646
1. Initialize the LaunchDarkly client
4747
1. Create a chat configuration using the AI Config
4848
1. Send a message to the AI and display the response
49-
1. Continue the conversation with a follow-up question
5049
1. Automatically track interaction metrics (duration, tokens, success/error)
51-
52-
## Features Demonstrated
53-
54-
- **AI Config Integration**: Using LaunchDarkly to configure AI models and prompts
55-
- **Variable Interpolation**: Using Mustache templates with runtime variables
56-
- **Chat Conversations**: Multi-turn conversations with message history
57-
- **Provider Integration**: Using multiple AI providers through the LaunchDarkly AI SDK
58-
- **Metrics Tracking**: Automatic tracking of token usage and performance

packages/sdk/server-ai/examples/tracked-chat/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"@langchain/google-genai": "^0.2.18",
1414
"@launchdarkly/node-server-sdk": "^9.0.0",
1515
"@launchdarkly/server-sdk-ai": "0.11.4",
16-
"@launchdarkly/server-sdk-ai-langchain": "0.0.0",
17-
"@launchdarkly/server-sdk-ai-vercel": "0.0.0",
16+
"@launchdarkly/server-sdk-ai-langchain": "0.1.1",
17+
"@launchdarkly/server-sdk-ai-openai": "0.1.0",
18+
"@launchdarkly/server-sdk-ai-vercel": "0.1.0",
1819
"dotenv": "^16.0.0",
1920
"langchain": "^0.1.0"
2021
},

packages/sdk/server-ai/examples/tracked-chat/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async function main(): Promise<void> {
5858
// Example of using the chat functionality
5959
console.log('\n*** Starting chat conversation:');
6060
try {
61-
const userInput = 'Hello! Can you help me understand what LaunchDarkly is?';
61+
const userInput = 'Hello! Can you help me understand how your company can help me?';
6262
console.log('User Input:', userInput);
6363

6464
const response = await chat.invoke(userInput);

0 commit comments

Comments
 (0)