LaunchDarkly Dotnet Server AI SDK
Search Results for

    Show / Hide Table of Contents

    Class LdAiConfig.Builder

    Builder for constructing an LdAiConfig instance, which can be passed as the default value to the AI Client's Config(string, Context, LdAiConfig, IReadOnlyDictionary<string, object>) method.

    Inheritance
    object
    LdAiConfig.Builder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LaunchDarkly.Sdk.Server.Ai.Config
    Assembly: LaunchDarkly.ServerSdk.Ai.dll
    Syntax
    public class LdAiConfig.Builder

    Methods

    | Edit this page View Source

    AddMessage(string, Role)

    Adds a message with the given content and role. The default role is User.

    Declaration
    public LdAiConfig.Builder AddMessage(string content, Role role = Role.User)
    Parameters
    Type Name Description
    string content

    the content, which may contain Mustache templates

    Role role

    the role

    Returns
    Type Description
    LdAiConfig.Builder

    a new builder

    | Edit this page View Source

    Build()

    Builds the LdAiConfig instance.

    Declaration
    public LdAiConfig Build()
    Returns
    Type Description
    LdAiConfig

    a new LdAiConfig

    | Edit this page View Source

    Disable()

    Disables the config.

    Declaration
    public LdAiConfig.Builder Disable()
    Returns
    Type Description
    LdAiConfig.Builder

    the builder

    | Edit this page View Source

    Enable()

    Enables the config.

    Declaration
    public LdAiConfig.Builder Enable()
    Returns
    Type Description
    LdAiConfig.Builder

    the builder

    | Edit this page View Source

    SetCustomModelParam(string, LdValue)

    Sets a custom parameter for the model.

    Declaration
    public LdAiConfig.Builder SetCustomModelParam(string name, LdValue value)
    Parameters
    Type Name Description
    string name

    the custom parameter name

    LdValue value

    the custom parameter value

    Returns
    Type Description
    LdAiConfig.Builder

    the builder

    | Edit this page View Source

    SetEnabled(bool)

    Sets the enabled state of the config based on a boolean.

    Declaration
    public LdAiConfig.Builder SetEnabled(bool enabled)
    Parameters
    Type Name Description
    bool enabled

    whether the config is enabled

    Returns
    Type Description
    LdAiConfig.Builder

    the builder

    | Edit this page View Source

    SetModelName(string)

    Sets the model's name. By default, this will be the empty string.

    Declaration
    public LdAiConfig.Builder SetModelName(string name)
    Parameters
    Type Name Description
    string name

    the model name

    Returns
    Type Description
    LdAiConfig.Builder

    the builder

    | Edit this page View Source

    SetModelParam(string, LdValue)

    Sets a parameter for the model.

    Declaration
    public LdAiConfig.Builder SetModelParam(string name, LdValue value)
    Parameters
    Type Name Description
    string name

    the parameter name

    LdValue value

    the parameter value

    Returns
    Type Description
    LdAiConfig.Builder

    the builder

    | Edit this page View Source

    SetModelProviderName(string)

    Sets the model provider's name. By default, this will be the empty string.

    Declaration
    public LdAiConfig.Builder SetModelProviderName(string name)
    Parameters
    Type Name Description
    string name

    the name

    Returns
    Type Description
    LdAiConfig.Builder

    the builder

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