diff --git a/src/libs/Braintrust/Generated/Braintrust.AllOf.2.g.cs b/src/libs/Braintrust/Generated/Braintrust.AllOf.2.g.cs
index 5521ee1..fb36823 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AllOf.2.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AllOf.2.g.cs
@@ -25,6 +25,19 @@ namespace Braintrust
#endif
public bool IsValue1 => Value1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T1? value)
+ {
+ value = Value1;
+ return IsValue1;
+ }
+
///
///
///
@@ -41,6 +54,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
#endif
public bool IsValue2 => Value2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickValue2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T2? value)
+ {
+ value = Value2;
+ return IsValue2;
+ }
///
///
///
@@ -157,6 +183,30 @@ public bool Validate()
///
public void Match(
global::System.Action? value1 = null,
+
+ global::System.Action? value2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsValue1)
+ {
+ value1?.Invoke(Value1!);
+ }
+ else if (IsValue2)
+ {
+ value2?.Invoke(Value2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
bool validate = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AnyOf.2.g.cs b/src/libs/Braintrust/Generated/Braintrust.AnyOf.2.g.cs
index dd53ef3..0b14c50 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AnyOf.2.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AnyOf.2.g.cs
@@ -25,6 +25,19 @@ namespace Braintrust
#endif
public bool IsValue1 => Value1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T1? value)
+ {
+ value = Value1;
+ return IsValue1;
+ }
+
///
///
///
@@ -41,6 +54,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value2))]
#endif
public bool IsValue2 => Value2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickValue2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T2? value)
+ {
+ value = Value2;
+ return IsValue2;
+ }
///
///
///
@@ -143,6 +169,30 @@ public bool Validate()
///
public void Match(
global::System.Action? value1 = null,
+
+ global::System.Action? value2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsValue1)
+ {
+ value1?.Invoke(Value1!);
+ }
+ else if (IsValue2)
+ {
+ value2?.Invoke(Value2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
bool validate = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AnyOf.3.g.cs b/src/libs/Braintrust/Generated/Braintrust.AnyOf.3.g.cs
index 21c27a1..50895a1 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AnyOf.3.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AnyOf.3.g.cs
@@ -25,6 +25,19 @@ namespace Braintrust
#endif
public bool IsValue1 => Value1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T1? value)
+ {
+ value = Value1;
+ return IsValue1;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Braintrust
#endif
public bool IsValue2 => Value2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T2? value)
+ {
+ value = Value2;
+ return IsValue2;
+ }
+
///
///
///
@@ -58,6 +84,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value3))]
#endif
public bool IsValue3 => Value3 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickValue3(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T3? value)
+ {
+ value = Value3;
+ return IsValue3;
+ }
///
///
///
@@ -187,6 +226,36 @@ public bool Validate()
///
public void Match(
global::System.Action? value1 = null,
+
+ global::System.Action? value2 = null,
+
+ global::System.Action? value3 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsValue1)
+ {
+ value1?.Invoke(Value1!);
+ }
+ else if (IsValue2)
+ {
+ value2?.Invoke(Value2!);
+ }
+ else if (IsValue3)
+ {
+ value3?.Invoke(Value3!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
global::System.Action? value3 = null,
bool validate = true)
diff --git a/src/libs/Braintrust/Generated/Braintrust.AnyOf.4.g.cs b/src/libs/Braintrust/Generated/Braintrust.AnyOf.4.g.cs
index 47a170a..f4b9c30 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AnyOf.4.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AnyOf.4.g.cs
@@ -25,6 +25,19 @@ namespace Braintrust
#endif
public bool IsValue1 => Value1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T1? value)
+ {
+ value = Value1;
+ return IsValue1;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Braintrust
#endif
public bool IsValue2 => Value2 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T2? value)
+ {
+ value = Value2;
+ return IsValue2;
+ }
+
///
///
///
@@ -59,6 +85,19 @@ namespace Braintrust
#endif
public bool IsValue3 => Value3 != null;
+ ///
+ ///
+ ///
+ public bool TryPickValue3(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T3? value)
+ {
+ value = Value3;
+ return IsValue3;
+ }
+
///
///
///
@@ -75,6 +114,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Value4))]
#endif
public bool IsValue4 => Value4 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickValue4(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out T4? value)
+ {
+ value = Value4;
+ return IsValue4;
+ }
///
///
///
@@ -231,6 +283,42 @@ public bool Validate()
///
public void Match(
global::System.Action? value1 = null,
+
+ global::System.Action? value2 = null,
+
+ global::System.Action? value3 = null,
+
+ global::System.Action? value4 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsValue1)
+ {
+ value1?.Invoke(Value1!);
+ }
+ else if (IsValue2)
+ {
+ value2?.Invoke(Value2!);
+ }
+ else if (IsValue3)
+ {
+ value3?.Invoke(Value3!);
+ }
+ else if (IsValue4)
+ {
+ value4?.Invoke(Value4!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? value1 = null,
global::System.Action? value2 = null,
global::System.Action? value3 = null,
global::System.Action? value4 = null,
diff --git a/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.Constructors.Bearer.g.cs b/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.Constructors.Bearer.g.cs
index 1818893..bf14dc5 100644
--- a/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.Constructors.Bearer.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.Constructors.Bearer.g.cs
@@ -26,5 +26,6 @@ partial void Authorizing(
ref string apiKey);
partial void Authorized(
global::System.Net.Http.HttpClient client);
+
}
}
\ No newline at end of file
diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.AISecretType.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.AISecretType.g.cs
index 2da5599..0edc1c9 100644
--- a/src/libs/Braintrust/Generated/Braintrust.Models.AISecretType.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.Models.AISecretType.g.cs
@@ -26,6 +26,19 @@ namespace Braintrust
#endif
public bool IsAISecretTypeVariant1 => AISecretTypeVariant1 != null;
+ ///
+ ///
+ ///
+ public bool TryPickAISecretTypeVariant1(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out string? value)
+ {
+ value = AISecretTypeVariant1;
+ return IsAISecretTypeVariant1;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AISecretTypeVariant2))]
#endif
public bool IsAISecretTypeVariant2 => AISecretTypeVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickAISecretTypeVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::System.Collections.Generic.IList? value)
+ {
+ value = AISecretTypeVariant2;
+ return IsAISecretTypeVariant2;
+ }
///
///
///
@@ -100,8 +126,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? aISecretTypeVariant1 = null,
- global::System.Func?, TResult>? aISecretTypeVariant2 = null,
+ global::System.Func? aISecretTypeVariant1 = null,
+ global::System.Func, TResult>? aISecretTypeVariant2 = null,
bool validate = true)
{
if (validate)
@@ -125,8 +151,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? aISecretTypeVariant1 = null,
- global::System.Action?>? aISecretTypeVariant2 = null,
+ global::System.Action? aISecretTypeVariant1 = null,
+
+ global::System.Action>? aISecretTypeVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAISecretTypeVariant1)
+ {
+ aISecretTypeVariant1?.Invoke(AISecretTypeVariant1!);
+ }
+ else if (IsAISecretTypeVariant2)
+ {
+ aISecretTypeVariant2?.Invoke(AISecretTypeVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? aISecretTypeVariant1 = null,
+ global::System.Action>? aISecretTypeVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ChatCompletionContentPart.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ChatCompletionContentPart.g.cs
index f073efa..e938bf8 100644
--- a/src/libs/Braintrust/Generated/Braintrust.Models.ChatCompletionContentPart.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.Models.ChatCompletionContentPart.g.cs
@@ -26,6 +26,19 @@ namespace Braintrust
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionContentPartTextWithTitle? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace Braintrust
#endif
public bool IsImageUrl => ImageUrl != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageUrl(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionContentPartImageWithTitle? value)
+ {
+ value = ImageUrl;
+ return IsImageUrl;
+ }
+
///
///
///
@@ -59,6 +85,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(File))]
#endif
public bool IsFile => File != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFile(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionContentPartFileWithTitle? value)
+ {
+ value = File;
+ return IsFile;
+ }
///
///
///
@@ -157,9 +196,9 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? imageUrl = null,
- global::System.Func? file = null,
+ global::System.Func? text = null,
+ global::System.Func? imageUrl = null,
+ global::System.Func? file = null,
bool validate = true)
{
if (validate)
@@ -187,9 +226,39 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? imageUrl = null,
- global::System.Action? file = null,
+ global::System.Action? text = null,
+
+ global::System.Action? imageUrl = null,
+
+ global::System.Action? file = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsImageUrl)
+ {
+ imageUrl?.Invoke(ImageUrl!);
+ }
+ else if (IsFile)
+ {
+ file?.Invoke(File!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? imageUrl = null,
+ global::System.Action? file = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.ChatCompletionMessageParam.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.ChatCompletionMessageParam.g.cs
index 6642391..7939a4d 100644
--- a/src/libs/Braintrust/Generated/Braintrust.Models.ChatCompletionMessageParam.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.Models.ChatCompletionMessageParam.g.cs
@@ -26,6 +26,19 @@ namespace Braintrust
#endif
public bool IsSystem => System != null;
+ ///
+ ///
+ ///
+ public bool TryPickSystem(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionMessageParamSystem? value)
+ {
+ value = System;
+ return IsSystem;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace Braintrust
#endif
public bool IsUser => User != null;
+ ///
+ ///
+ ///
+ public bool TryPickUser(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionMessageParamUser? value)
+ {
+ value = User;
+ return IsUser;
+ }
+
///
///
///
@@ -60,6 +86,19 @@ namespace Braintrust
#endif
public bool IsAssistant => Assistant != null;
+ ///
+ ///
+ ///
+ public bool TryPickAssistant(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionMessageParamAssistant? value)
+ {
+ value = Assistant;
+ return IsAssistant;
+ }
+
///
///
///
@@ -77,6 +116,19 @@ namespace Braintrust
#endif
public bool IsTool => Tool != null;
+ ///
+ ///
+ ///
+ public bool TryPickTool(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionMessageParamTool? value)
+ {
+ value = Tool;
+ return IsTool;
+ }
+
///
///
///
@@ -94,6 +146,19 @@ namespace Braintrust
#endif
public bool IsFunction => Function != null;
+ ///
+ ///
+ ///
+ public bool TryPickFunction(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionMessageParamFunction? value)
+ {
+ value = Function;
+ return IsFunction;
+ }
+
///
///
///
@@ -111,6 +176,19 @@ namespace Braintrust
#endif
public bool IsDeveloper => Developer != null;
+ ///
+ ///
+ ///
+ public bool TryPickDeveloper(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionMessageParamDeveloper? value)
+ {
+ value = Developer;
+ return IsDeveloper;
+ }
+
///
///
///
@@ -127,6 +205,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Fallback))]
#endif
public bool IsFallback => Fallback != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFallback(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.ChatCompletionMessageParamFallback? value)
+ {
+ value = Fallback;
+ return IsFallback;
+ }
///
///
///
@@ -313,13 +404,13 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? system = null,
- global::System.Func? user = null,
- global::System.Func? assistant = null,
- global::System.Func? tool = null,
- global::System.Func? function = null,
- global::System.Func? developer = null,
- global::System.Func? fallback = null,
+ global::System.Func? system = null,
+ global::System.Func? user = null,
+ global::System.Func? assistant = null,
+ global::System.Func? tool = null,
+ global::System.Func? function = null,
+ global::System.Func? developer = null,
+ global::System.Func? fallback = null,
bool validate = true)
{
if (validate)
@@ -363,13 +454,67 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? system = null,
- global::System.Action? user = null,
- global::System.Action? assistant = null,
- global::System.Action? tool = null,
- global::System.Action? function = null,
- global::System.Action? developer = null,
- global::System.Action? fallback = null,
+ global::System.Action? system = null,
+
+ global::System.Action? user = null,
+
+ global::System.Action? assistant = null,
+
+ global::System.Action? tool = null,
+
+ global::System.Action? function = null,
+
+ global::System.Action? developer = null,
+
+ global::System.Action? fallback = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSystem)
+ {
+ system?.Invoke(System!);
+ }
+ else if (IsUser)
+ {
+ user?.Invoke(User!);
+ }
+ else if (IsAssistant)
+ {
+ assistant?.Invoke(Assistant!);
+ }
+ else if (IsTool)
+ {
+ tool?.Invoke(Tool!);
+ }
+ else if (IsFunction)
+ {
+ function?.Invoke(Function!);
+ }
+ else if (IsDeveloper)
+ {
+ developer?.Invoke(Developer!);
+ }
+ else if (IsFallback)
+ {
+ fallback?.Invoke(Fallback!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? system = null,
+ global::System.Action? user = null,
+ global::System.Action? assistant = null,
+ global::System.Action? tool = null,
+ global::System.Action? function = null,
+ global::System.Action? developer = null,
+ global::System.Action? fallback = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.FunctionData.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.FunctionData.g.cs
index c85010c..e7ce7aa 100644
--- a/src/libs/Braintrust/Generated/Braintrust.Models.FunctionData.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.Models.FunctionData.g.cs
@@ -26,6 +26,19 @@ namespace Braintrust
#endif
public bool IsPrompt => Prompt != null;
+ ///
+ ///
+ ///
+ public bool TryPickPrompt(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataPrompt? value)
+ {
+ value = Prompt;
+ return IsPrompt;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace Braintrust
#endif
public bool IsCode => Code != null;
+ ///
+ ///
+ ///
+ public bool TryPickCode(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataCode? value)
+ {
+ value = Code;
+ return IsCode;
+ }
+
///
/// This feature is preliminary and unsupported.
///
@@ -60,6 +86,19 @@ namespace Braintrust
#endif
public bool IsGraph => Graph != null;
+ ///
+ ///
+ ///
+ public bool TryPickGraph(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.GraphData? value)
+ {
+ value = Graph;
+ return IsGraph;
+ }
+
///
/// A remote eval to run
///
@@ -77,6 +116,19 @@ namespace Braintrust
#endif
public bool IsRemoteEval => RemoteEval != null;
+ ///
+ ///
+ ///
+ public bool TryPickRemoteEval(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataRemoteEval? value)
+ {
+ value = RemoteEval;
+ return IsRemoteEval;
+ }
+
///
///
///
@@ -94,6 +146,19 @@ namespace Braintrust
#endif
public bool IsGlobal => Global != null;
+ ///
+ ///
+ ///
+ public bool TryPickGlobal(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataGlobal? value)
+ {
+ value = Global;
+ return IsGlobal;
+ }
+
///
///
///
@@ -111,6 +176,19 @@ namespace Braintrust
#endif
public bool IsFacet => Facet != null;
+ ///
+ ///
+ ///
+ public bool TryPickFacet(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FacetData? value)
+ {
+ value = Facet;
+ return IsFacet;
+ }
+
///
///
///
@@ -128,6 +206,19 @@ namespace Braintrust
#endif
public bool IsBatchedFacet => BatchedFacet != null;
+ ///
+ ///
+ ///
+ public bool TryPickBatchedFacet(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.BatchedFacetData? value)
+ {
+ value = BatchedFacet;
+ return IsBatchedFacet;
+ }
+
///
///
///
@@ -145,6 +236,19 @@ namespace Braintrust
#endif
public bool IsParameters => Parameters != null;
+ ///
+ ///
+ ///
+ public bool TryPickParameters(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataParameters? value)
+ {
+ value = Parameters;
+ return IsParameters;
+ }
+
///
///
///
@@ -161,6 +265,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionDataVariant9))]
#endif
public bool IsFunctionDataVariant9 => FunctionDataVariant9 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFunctionDataVariant9(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.AllOf? value)
+ {
+ value = FunctionDataVariant9;
+ return IsFunctionDataVariant9;
+ }
///
///
///
@@ -391,14 +508,14 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? prompt = null,
- global::System.Func? code = null,
- global::System.Func? graph = null,
- global::System.Func? remoteEval = null,
- global::System.Func? global = null,
- global::System.Func? facet = null,
- global::System.Func? batchedFacet = null,
- global::System.Func? parameters = null,
+ global::System.Func? prompt = null,
+ global::System.Func? code = null,
+ global::System.Func? graph = null,
+ global::System.Func? remoteEval = null,
+ global::System.Func? global = null,
+ global::System.Func? facet = null,
+ global::System.Func? batchedFacet = null,
+ global::System.Func? parameters = null,
global::System.Func?, TResult>? functionDataVariant9 = null,
bool validate = true)
{
@@ -451,14 +568,80 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? prompt = null,
- global::System.Action? code = null,
- global::System.Action? graph = null,
- global::System.Action? remoteEval = null,
- global::System.Action? global = null,
- global::System.Action? facet = null,
- global::System.Action? batchedFacet = null,
- global::System.Action? parameters = null,
+ global::System.Action? prompt = null,
+
+ global::System.Action? code = null,
+
+ global::System.Action? graph = null,
+
+ global::System.Action? remoteEval = null,
+
+ global::System.Action? global = null,
+
+ global::System.Action? facet = null,
+
+ global::System.Action? batchedFacet = null,
+
+ global::System.Action? parameters = null,
+
+ global::System.Action?>? functionDataVariant9 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsPrompt)
+ {
+ prompt?.Invoke(Prompt!);
+ }
+ else if (IsCode)
+ {
+ code?.Invoke(Code!);
+ }
+ else if (IsGraph)
+ {
+ graph?.Invoke(Graph!);
+ }
+ else if (IsRemoteEval)
+ {
+ remoteEval?.Invoke(RemoteEval!);
+ }
+ else if (IsGlobal)
+ {
+ global?.Invoke(Global!);
+ }
+ else if (IsFacet)
+ {
+ facet?.Invoke(Facet!);
+ }
+ else if (IsBatchedFacet)
+ {
+ batchedFacet?.Invoke(BatchedFacet!);
+ }
+ else if (IsParameters)
+ {
+ parameters?.Invoke(Parameters!);
+ }
+ else if (IsFunctionDataVariant9)
+ {
+ functionDataVariant9?.Invoke(FunctionDataVariant9!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? prompt = null,
+ global::System.Action? code = null,
+ global::System.Action? graph = null,
+ global::System.Action? remoteEval = null,
+ global::System.Action? global = null,
+ global::System.Action? facet = null,
+ global::System.Action? batchedFacet = null,
+ global::System.Action? parameters = null,
global::System.Action?>? functionDataVariant9 = null,
bool validate = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.Models.FunctionDataNullish.g.cs b/src/libs/Braintrust/Generated/Braintrust.Models.FunctionDataNullish.g.cs
index 97cd7e9..c95cd79 100644
--- a/src/libs/Braintrust/Generated/Braintrust.Models.FunctionDataNullish.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.Models.FunctionDataNullish.g.cs
@@ -26,6 +26,19 @@ namespace Braintrust
#endif
public bool IsPrompt => Prompt != null;
+ ///
+ ///
+ ///
+ public bool TryPickPrompt(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataNullishPrompt? value)
+ {
+ value = Prompt;
+ return IsPrompt;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace Braintrust
#endif
public bool IsCode => Code != null;
+ ///
+ ///
+ ///
+ public bool TryPickCode(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataNullishCode? value)
+ {
+ value = Code;
+ return IsCode;
+ }
+
///
/// This feature is preliminary and unsupported.
///
@@ -60,6 +86,19 @@ namespace Braintrust
#endif
public bool IsGraph => Graph != null;
+ ///
+ ///
+ ///
+ public bool TryPickGraph(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.GraphData? value)
+ {
+ value = Graph;
+ return IsGraph;
+ }
+
///
/// A remote eval to run
///
@@ -77,6 +116,19 @@ namespace Braintrust
#endif
public bool IsRemoteEval => RemoteEval != null;
+ ///
+ ///
+ ///
+ public bool TryPickRemoteEval(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataNullishRemoteEval? value)
+ {
+ value = RemoteEval;
+ return IsRemoteEval;
+ }
+
///
///
///
@@ -94,6 +146,19 @@ namespace Braintrust
#endif
public bool IsGlobal => Global != null;
+ ///
+ ///
+ ///
+ public bool TryPickGlobal(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataNullishGlobal? value)
+ {
+ value = Global;
+ return IsGlobal;
+ }
+
///
///
///
@@ -111,6 +176,19 @@ namespace Braintrust
#endif
public bool IsFacet => Facet != null;
+ ///
+ ///
+ ///
+ public bool TryPickFacet(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FacetData? value)
+ {
+ value = Facet;
+ return IsFacet;
+ }
+
///
///
///
@@ -128,6 +206,19 @@ namespace Braintrust
#endif
public bool IsBatchedFacet => BatchedFacet != null;
+ ///
+ ///
+ ///
+ public bool TryPickBatchedFacet(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.BatchedFacetData? value)
+ {
+ value = BatchedFacet;
+ return IsBatchedFacet;
+ }
+
///
///
///
@@ -145,6 +236,19 @@ namespace Braintrust
#endif
public bool IsParameters => Parameters != null;
+ ///
+ ///
+ ///
+ public bool TryPickParameters(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.FunctionDataNullishParameters? value)
+ {
+ value = Parameters;
+ return IsParameters;
+ }
+
///
///
///
@@ -162,6 +266,19 @@ namespace Braintrust
#endif
public bool IsFunctionDataNullishVariant9 => FunctionDataNullishVariant9 != null;
+ ///
+ ///
+ ///
+ public bool TryPickFunctionDataNullishVariant9(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Braintrust.AllOf? value)
+ {
+ value = FunctionDataNullishVariant9;
+ return IsFunctionDataNullishVariant9;
+ }
+
///
///
///
@@ -178,6 +295,19 @@ namespace Braintrust
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FunctionDataNullishVariant10))]
#endif
public bool IsFunctionDataNullishVariant10 => FunctionDataNullishVariant10 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickFunctionDataNullishVariant10(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out object? value)
+ {
+ value = FunctionDataNullishVariant10;
+ return IsFunctionDataNullishVariant10;
+ }
///
///
///
@@ -412,16 +542,16 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? prompt = null,
- global::System.Func? code = null,
- global::System.Func? graph = null,
- global::System.Func? remoteEval = null,
- global::System.Func? global = null,
- global::System.Func? facet = null,
- global::System.Func? batchedFacet = null,
- global::System.Func? parameters = null,
+ global::System.Func? prompt = null,
+ global::System.Func? code = null,
+ global::System.Func? graph = null,
+ global::System.Func? remoteEval = null,
+ global::System.Func? global = null,
+ global::System.Func? facet = null,
+ global::System.Func? batchedFacet = null,
+ global::System.Func? parameters = null,
global::System.Func?, TResult>? functionDataNullishVariant9 = null,
- global::System.Func