Class LdAiJudgeConfigDefault.Builder
Builder for constructing an LdAiJudgeConfigDefault instance.
Inherited Members
Namespace: LaunchDarkly.Sdk.Server.Ai.Config
Assembly: LaunchDarkly.ServerSdk.Ai.dll
Syntax
public class LdAiJudgeConfigDefault.Builder
Methods
| Edit this page View SourceAddMessage(string, Role)
Adds a message with the given content and role. The default role is User.
Declaration
public LdAiJudgeConfigDefault.Builder AddMessage(string content, LdAiConfigTypes.Role role = Role.User)
Parameters
| Type | Name | Description |
|---|---|---|
| string | content | the content, which may contain Mustache templates |
| LdAiConfigTypes.Role | role | the role |
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |
Build()
Builds the LdAiJudgeConfigDefault instance.
Declaration
public LdAiJudgeConfigDefault Build()
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault | a new LdAiJudgeConfigDefault |
Disable()
Disables the config.
Declaration
public LdAiJudgeConfigDefault.Builder Disable()
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |
Enable()
Enables the config.
Declaration
public LdAiJudgeConfigDefault.Builder Enable()
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |
SetCustomModelParam(string, LdValue)
Sets a custom parameter for the model.
Declaration
public LdAiJudgeConfigDefault.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 |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |
SetEnabled(bool)
Sets the enabled state of the config.
Declaration
public LdAiJudgeConfigDefault.Builder SetEnabled(bool enabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | enabled | whether the config is enabled |
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |
SetEvaluationMetricKey(string)
Sets the evaluation metric key used to identify this judge's metric.
Declaration
public LdAiJudgeConfigDefault.Builder SetEvaluationMetricKey(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | the metric key |
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |
SetModelName(string)
Sets the model's name.
Declaration
public LdAiJudgeConfigDefault.Builder SetModelName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | the model name |
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |
SetModelParam(string, LdValue)
Sets a parameter for the model.
Declaration
public LdAiJudgeConfigDefault.Builder SetModelParam(string name, LdValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | the parameter name |
| LdValue | value | the parameter value |
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |
SetModelProviderName(string)
Sets the model provider's name.
Declaration
public LdAiJudgeConfigDefault.Builder SetModelProviderName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | the provider name |
Returns
| Type | Description |
|---|---|
| LdAiJudgeConfigDefault.Builder | the builder |