Skip to content

Commit

Permalink
feat: update model signature
Browse files Browse the repository at this point in the history
  • Loading branch information
InTheCloudDan committed Nov 11, 2024
1 parent a7d6b99 commit 33dbdfe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/sdk/server-ai/examples/bedrock/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BedrockRuntimeClient, ConverseCommand, Message } from '@aws-sdk/client-
import { init } from '@launchdarkly/node-server-sdk';
import { initAi } from '@launchdarkly/server-sdk-ai';

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

Expand All @@ -18,7 +18,10 @@ if (!aiConfigKey) {
process.exit(1);
}

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

// Set up the context properties
const context = {
Expand Down
10 changes: 10 additions & 0 deletions packages/sdk/server-ai/src/api/config/LDAIConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ export interface LDModelConfig {
*/
modelId?: string;

/**
* The temperature of the model.
*/
temperature?: number;

/**
* The maximum number of tokens to generate.
*/
maxTokens?: number;

/**
* And additional model specific information.
*/
Expand Down

0 comments on commit 33dbdfe

Please sign in to comment.