File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
packages/sdk/server-ai/src/api Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,16 @@ import { LDContext } from '@launchdarkly/js-server-sdk-common';
22
33import { LDAIConfig , LDGenerationConfig } from './config/LDAIConfig' ;
44
5+ export interface LDAIDefaults extends LDGenerationConfig {
6+ /**
7+ * Whether the configuration is enabled.
8+ */
9+ enabled ?: boolean ;
10+ }
11+
512/**
613 * Interface for performing AI operations using LaunchDarkly.
714 */
8-
915export interface LDAIClient {
1016 /**
1117 * Parses and interpolates a template string with the provided variables.
@@ -68,7 +74,7 @@ export interface LDAIClient {
6874 * }
6975 * ```
7076 */
71- modelConfig < TDefault extends LDGenerationConfig > (
77+ modelConfig < TDefault extends LDAIDefaults > (
7278 key : string ,
7379 context : LDContext ,
7480 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