1.0.0-beta87 (latest) 1.0.0-beta86

    public sealed class EvaluationParserConfig.Types.CustomCodeParserConfig : IMessage<EvaluationParserConfig.Types.CustomCodeParserConfig>, IEquatable<EvaluationParserConfig.Types.CustomCodeParserConfig>, IDeepCloneable<EvaluationParserConfig.Types.CustomCodeParserConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Vertex AI v1beta1 API class EvaluationParserConfig.Types.CustomCodeParserConfig.

Configuration for parsing the LLM response using custom code.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> EvaluationParserConfig.Types.CustomCodeParserConfig

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[EvaluationParserConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig.Types)[CustomCodeParserConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig.Types.CustomCodeParserConfig), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[EvaluationParserConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig.Types)[CustomCodeParserConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig.Types.CustomCodeParserConfig), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[EvaluationParserConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig.Types)[CustomCodeParserConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig.Types.CustomCodeParserConfig), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.AIPlatform.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)

## Assembly

Google.Cloud.AIPlatform.V1Beta1.dll

## Constructors

### CustomCodeParserConfig()

    public CustomCodeParserConfig()

### CustomCodeParserConfig(CustomCodeParserConfig)

    public CustomCodeParserConfig(EvaluationParserConfig.Types.CustomCodeParserConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.EvaluationParserConfig.Types.CustomCodeParserConfig` |

## Properties

### HasParsingFunction

    public bool HasParsingFunction { get; }

Gets whether the "parsing_function" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### ParsingFunction

    public string ParsingFunction { get; set; }

Required. Python function for parsing results. The function should be
defined within this string.

The function takes a list of strings (LLM responses) and should return
either a list of dictionaries (for rubrics) or a single dictionary
(for a metric result).

Example function signature:
def parse(responses: list\[str\]) -\> list\[dict\[str, Any\]\] \| dict\[str, Any\]:

When parsing rubrics, return a list of dictionaries, where each
dictionary represents a Rubric.
Example for rubrics:
\[
{
"content": {"property": {"description": "The response is
factual."}},
"type": "FACTUALITY",
"importance": "HIGH"
},
{
"content": {"property": {"description": "The response is
fluent."}},
"type": "FLUENCY",
"importance": "MEDIUM"
}
\]

When parsing critique results, return a dictionary representing a
MetricResult.
Example for a metric result:
{
"score": 0.8,
"explanation": "The model followed most instructions.",
"rubric_verdicts": \[...\]
}

... code for result extraction and aggregation

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |