-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ec3f94
commit 8c18ca5
Showing
2 changed files
with
31 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Collections.Generic; | ||
using LaunchDarkly.Sdk.Server.Ai.Config; | ||
|
||
namespace LaunchDarkly.Sdk.Server.Ai.Interfaces; | ||
|
||
/// <summary> | ||
/// Represents the interface of the AI client, useful for mocking. | ||
/// </summary> | ||
public interface ILdAiClient | ||
{ | ||
|
||
/// <summary> | ||
/// Retrieves a LaunchDarkly AI config identified by the given key. The return value | ||
/// is an <see cref="LdAiConfigTracker"/>, which makes the configuration available and | ||
/// provides convenience methods for generating events related to model usage. | ||
/// | ||
/// Any variables provided will be interpolated into the prompt's messages. | ||
/// Additionally, the current LaunchDarkly context will be available as 'ldctx' within | ||
/// a prompt message. | ||
/// | ||
/// </summary> | ||
/// <param name="key">the flag key</param> | ||
/// <param name="context">the context</param> | ||
/// <param name="defaultValue">the default config, if unable to retrieve from LaunchDarkly</param> | ||
/// <param name="variables">the list of variables used when interpolating the prompt</param> | ||
/// <returns>an AI config tracker</returns> | ||
public LdAiConfigTracker ModelConfig(string key, Context context, LdAiConfig defaultValue, | ||
IReadOnlyDictionary<string, object> variables = null); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters