File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
packages/sdk/server-ai/src/api Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,18 @@ import { LDContext } from '@launchdarkly/js-server-sdk-common';
33import { LDAIConfig , LDGenerationConfig } from './config/LDAIConfig' ;
44
55/**
6- * Interface for performing AI operations using LaunchDarkly .
6+ * Interface for default model configuration .
77 */
8+ export interface LDAIDefaults extends LDGenerationConfig {
9+ /**
10+ * Whether the configuration is enabled.
11+ */
12+ enabled ?: boolean ;
13+ }
814
15+ /**
16+ * Interface for performing AI operations using LaunchDarkly.
17+ */
918export interface LDAIClient {
1019 /**
1120 * Parses and interpolates a template string with the provided variables.
@@ -68,7 +77,7 @@ export interface LDAIClient {
6877 * }
6978 * ```
7079 */
71- modelConfig < TDefault extends LDGenerationConfig > (
80+ modelConfig < TDefault extends LDAIDefaults > (
7281 key : string ,
7382 context : LDContext ,
7483 defaultValue : TDefault ,
Original file line number Diff line number Diff line change @@ -9,6 +9,17 @@ export interface LDModelConfig {
99 */
1010 modelId ?: string ;
1111
12+ /**
13+ * Tuning parameter for randomness versus determinism. Exact effect will be determined by the
14+ * model.
15+ */
16+ temperature ?: number ;
17+
18+ /**
19+ * The maximum number of tokens.
20+ */
21+ maxTokens ?: number ;
22+
1223 /**
1324 * And additional model specific information.
1425 */
You can’t perform that action at this time.
0 commit comments