Skip to content

Commit 33dbdfe

Browse files
author
Daniel OBrien
committed
feat: update model signature
1 parent a7d6b99 commit 33dbdfe

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

packages/sdk/server-ai/examples/bedrock/src/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { BedrockRuntimeClient, ConverseCommand, Message } from '@aws-sdk/client-
44
import { init } from '@launchdarkly/node-server-sdk';
55
import { initAi } from '@launchdarkly/server-sdk-ai';
66

7-
const sdkKey = process.env.LAUNCHDARKLY_SDK_KEY;
7+
const sdkKey = process.env.LAUNCHDARKLY_SDK_KEY || 'sdk-8822efc4-1b96-468f-9edb-1db6a75d9701';
88
const aiConfigKey = process.env.LAUNCHDARKLY_AI_CONFIG_KEY || 'sample-ai-config';
99
const awsClient = new BedrockRuntimeClient({ region: 'us-east-1' });
1010

@@ -18,7 +18,10 @@ if (!aiConfigKey) {
1818
process.exit(1);
1919
}
2020

21-
const ldClient = init(sdkKey);
21+
const ldClient = init(sdkKey, {
22+
baseUri: 'https://ld-stg.launchdarkly.com',
23+
streamUri: 'https://stream-stg.launchdarkly.com',
24+
});
2225

2326
// Set up the context properties
2427
const context = {

packages/sdk/server-ai/src/api/config/LDAIConfig.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ export interface LDModelConfig {
99
*/
1010
modelId?: string;
1111

12+
/**
13+
* The temperature of the model.
14+
*/
15+
temperature?: number;
16+
17+
/**
18+
* The maximum number of tokens to generate.
19+
*/
20+
maxTokens?: number;
21+
1222
/**
1323
* And additional model specific information.
1424
*/

0 commit comments

Comments
 (0)