LaunchDarkly Dotnet Server AI SDK
Search Results for

    Show / Hide Table of Contents

    Interface ILdAiClient

    Represents the interface of the AI client, useful for mocking.

    Namespace: LaunchDarkly.Sdk.Server.Ai.Interfaces
    Assembly: LaunchDarkly.ServerSdk.Ai.dll
    Syntax
    public interface ILdAiClient

    Methods

    | Edit this page View Source

    Config(string, Context, LdAiConfig, IReadOnlyDictionary<string, object>)

    Retrieves a LaunchDarkly AI config identified by the given key. The return value is an ILdAiConfigTracker, 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.

    Declaration
    ILdAiConfigTracker Config(string key, Context context, LdAiConfig defaultValue, IReadOnlyDictionary<string, object> variables = null)
    Parameters
    Type Name Description
    string key

    the AI config key

    Context context

    the context

    LdAiConfig defaultValue

    the default config, if unable to retrieve from LaunchDarkly

    IReadOnlyDictionary<string, object> variables

    the list of variables used when interpolating the prompt

    Returns
    Type Description
    ILdAiConfigTracker

    an AI config tracker

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX