diff --git a/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs b/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs
index cb9097e3..880bbbf9 100644
--- a/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AllOf.2.g.cs
@@ -25,6 +25,19 @@ namespace Vectara
#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 Vectara
[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/Vectara/Generated/Vectara.Models.AgentEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs
index 59ffc18b..46b56fd5 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentEvent.g.cs
@@ -31,6 +31,19 @@ namespace Vectara
#endif
public bool IsInputMessage => InputMessage != null;
+ ///
+ ///
+ ///
+ public bool TryPickInputMessage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InputMessageEvent? value)
+ {
+ value = InputMessage;
+ return IsInputMessage;
+ }
+
///
/// An event representing the loading of a skill's content into the conversation.
///
@@ -48,6 +61,19 @@ namespace Vectara
#endif
public bool IsSkillLoad => SkillLoad != null;
+ ///
+ ///
+ ///
+ public bool TryPickSkillLoad(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.SkillLoadEvent? value)
+ {
+ value = SkillLoad;
+ return IsSkillLoad;
+ }
+
///
/// Event representing files uploaded to the agent workspace as artifacts.
/// This event is created when users upload one or more files to an agent session using multipart requests. The event becomes part of the session's conversation history and contains references to all artifacts that were uploaded in the request. Each uploaded file is assigned a unique artifact identifier and stored in the session's workspace.
@@ -68,6 +94,19 @@ namespace Vectara
#endif
public bool IsArtifactUpload => ArtifactUpload != null;
+ ///
+ ///
+ ///
+ public bool TryPickArtifactUpload(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ArtifactUploadEvent? value)
+ {
+ value = ArtifactUpload;
+ return IsArtifactUpload;
+ }
+
///
/// An event representing input to a tool call.
///
@@ -85,6 +124,19 @@ namespace Vectara
#endif
public bool IsToolInput => ToolInput != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolInput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ToolInputEvent? value)
+ {
+ value = ToolInput;
+ return IsToolInput;
+ }
+
///
/// An event representing output from a tool call.
///
@@ -102,6 +154,19 @@ namespace Vectara
#endif
public bool IsToolOutput => ToolOutput != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolOutput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ToolOutputEvent? value)
+ {
+ value = ToolOutput;
+ return IsToolOutput;
+ }
+
///
/// An event representing chain-of-thought thinking by the agent.
///
@@ -119,6 +184,19 @@ namespace Vectara
#endif
public bool IsThinking => Thinking != null;
+ ///
+ ///
+ ///
+ public bool TryPickThinking(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ThinkingEvent? value)
+ {
+ value = Thinking;
+ return IsThinking;
+ }
+
///
/// An event representing a complete agent response.
///
@@ -136,6 +214,19 @@ namespace Vectara
#endif
public bool IsAgentOutput => AgentOutput != null;
+ ///
+ ///
+ ///
+ public bool TryPickAgentOutput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentOutputEvent? value)
+ {
+ value = AgentOutput;
+ return IsAgentOutput;
+ }
+
///
/// An event representing a complete agent response with structured JSON content conforming to a schema.
/// This event is published instead of AgentOutputEvent when the agent's output_parser is configured
@@ -159,6 +250,19 @@ namespace Vectara
#endif
public bool IsStructuredOutput => StructuredOutput != null;
+ ///
+ ///
+ ///
+ public bool TryPickStructuredOutput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StructuredOutputEvent? value)
+ {
+ value = StructuredOutput;
+ return IsStructuredOutput;
+ }
+
///
/// A transient event indicating the current request exceeded the LLM's context limit.
/// This event is not persisted to the session history.
@@ -177,6 +281,19 @@ namespace Vectara
#endif
public bool IsContextLimitExceeded => ContextLimitExceeded != null;
+ ///
+ ///
+ ///
+ public bool TryPickContextLimitExceeded(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ContextLimitExceededEvent? value)
+ {
+ value = ContextLimitExceeded;
+ return IsContextLimitExceeded;
+ }
+
///
/// A transient event indicating the agent exceeded the maximum number of step transitions,
/// which may indicate an infinite loop between steps.
@@ -196,6 +313,19 @@ namespace Vectara
#endif
public bool IsStepTransitionLimitExceeded => StepTransitionLimitExceeded != null;
+ ///
+ ///
+ ///
+ public bool TryPickStepTransitionLimitExceeded(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StepTransitionLimitExceededEvent? value)
+ {
+ value = StepTransitionLimitExceeded;
+ return IsStepTransitionLimitExceeded;
+ }
+
///
/// A transient event indicating the agent session was interrupted by a user request.
/// This event is not persisted to the session history.
@@ -214,6 +344,19 @@ namespace Vectara
#endif
public bool IsSessionInterrupted => SessionInterrupted != null;
+ ///
+ ///
+ ///
+ public bool TryPickSessionInterrupted(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.SessionInterruptedEvent? value)
+ {
+ value = SessionInterrupted;
+ return IsSessionInterrupted;
+ }
+
///
/// An event representing an image being loaded into the conversation context for viewing and analysis.
///
@@ -231,6 +374,19 @@ namespace Vectara
#endif
public bool IsImageRead => ImageRead != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageRead(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ImageReadEvent? value)
+ {
+ value = ImageRead;
+ return IsImageRead;
+ }
+
///
/// An event representing a transition between agent steps.
///
@@ -248,6 +404,19 @@ namespace Vectara
#endif
public bool IsStepTransition => StepTransition != null;
+ ///
+ ///
+ ///
+ public bool TryPickStepTransition(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StepTransitionEvent? value)
+ {
+ value = StepTransition;
+ return IsStepTransition;
+ }
+
///
/// An event indicating that context compaction has completed.
///
@@ -264,6 +433,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Compaction))]
#endif
public bool IsCompaction => Compaction != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCompaction(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CompactionEvent? value)
+ {
+ value = Compaction;
+ return IsCompaction;
+ }
///
///
///
@@ -693,6 +875,102 @@ public bool Validate()
///
public void Match(
global::System.Action? inputMessage = null,
+
+ global::System.Action? skillLoad = null,
+
+ global::System.Action? artifactUpload = null,
+
+ global::System.Action? toolInput = null,
+
+ global::System.Action? toolOutput = null,
+
+ global::System.Action? thinking = null,
+
+ global::System.Action? agentOutput = null,
+
+ global::System.Action? structuredOutput = null,
+
+ global::System.Action? contextLimitExceeded = null,
+
+ global::System.Action? stepTransitionLimitExceeded = null,
+
+ global::System.Action? sessionInterrupted = null,
+
+ global::System.Action? imageRead = null,
+
+ global::System.Action? stepTransition = null,
+
+ global::System.Action? compaction = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsInputMessage)
+ {
+ inputMessage?.Invoke(InputMessage!);
+ }
+ else if (IsSkillLoad)
+ {
+ skillLoad?.Invoke(SkillLoad!);
+ }
+ else if (IsArtifactUpload)
+ {
+ artifactUpload?.Invoke(ArtifactUpload!);
+ }
+ else if (IsToolInput)
+ {
+ toolInput?.Invoke(ToolInput!);
+ }
+ else if (IsToolOutput)
+ {
+ toolOutput?.Invoke(ToolOutput!);
+ }
+ else if (IsThinking)
+ {
+ thinking?.Invoke(Thinking!);
+ }
+ else if (IsAgentOutput)
+ {
+ agentOutput?.Invoke(AgentOutput!);
+ }
+ else if (IsStructuredOutput)
+ {
+ structuredOutput?.Invoke(StructuredOutput!);
+ }
+ else if (IsContextLimitExceeded)
+ {
+ contextLimitExceeded?.Invoke(ContextLimitExceeded!);
+ }
+ else if (IsStepTransitionLimitExceeded)
+ {
+ stepTransitionLimitExceeded?.Invoke(StepTransitionLimitExceeded!);
+ }
+ else if (IsSessionInterrupted)
+ {
+ sessionInterrupted?.Invoke(SessionInterrupted!);
+ }
+ else if (IsImageRead)
+ {
+ imageRead?.Invoke(ImageRead!);
+ }
+ else if (IsStepTransition)
+ {
+ stepTransition?.Invoke(StepTransition!);
+ }
+ else if (IsCompaction)
+ {
+ compaction?.Invoke(Compaction!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? inputMessage = null,
global::System.Action? skillLoad = null,
global::System.Action? artifactUpload = null,
global::System.Action? toolInput = null,
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs
index 177976a1..9ca5d0da 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentInput.g.cs
@@ -31,6 +31,19 @@ namespace Vectara
#endif
public bool IsText => Text != null;
+ ///
+ ///
+ ///
+ public bool TryPickText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentTextInput? value)
+ {
+ value = Text;
+ return IsText;
+ }
+
///
/// An input that invokes a skill by name.
///
@@ -47,6 +60,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Skill))]
#endif
public bool IsSkill => Skill != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickSkill(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentSkillInput? value)
+ {
+ value = Skill;
+ return IsSkill;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? skill = null,
+ global::System.Func? text = null,
+ global::System.Func? skill = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? skill = null,
+ global::System.Action? text = null,
+
+ global::System.Action? skill = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsText)
+ {
+ text?.Invoke(Text!);
+ }
+ else if (IsSkill)
+ {
+ skill?.Invoke(Skill!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? text = null,
+ global::System.Action? skill = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs
index 12dd3bff..98163772 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputEvent.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsBase => Base != null;
+ ///
+ ///
+ ///
+ public bool TryPickBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentEventBase? value)
+ {
+ value = Base;
+ return IsBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentOutputEventVariant2))]
#endif
public bool IsAgentOutputEventVariant2 => AgentOutputEventVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickAgentOutputEventVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentOutputEventVariant2? value)
+ {
+ value = AgentOutputEventVariant2;
+ return IsAgentOutputEventVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? @base = null,
- global::System.Func? agentOutputEventVariant2 = null,
+ global::System.Func? @base = null,
+ global::System.Func? agentOutputEventVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? @base = null,
- global::System.Action? agentOutputEventVariant2 = null,
+ global::System.Action? @base = null,
+
+ global::System.Action? agentOutputEventVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsBase)
+ {
+ @base?.Invoke(Base!);
+ }
+ else if (IsAgentOutputEventVariant2)
+ {
+ agentOutputEventVariant2?.Invoke(AgentOutputEventVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? @base = null,
+ global::System.Action? agentOutputEventVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs
index 9f8ab09f..ebbf9a70 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentOutputParser.g.cs
@@ -32,6 +32,19 @@ namespace Vectara
#endif
public bool IsDefault => Default != null;
+ ///
+ ///
+ ///
+ public bool TryPickDefault(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.DefaultOutputParser? value)
+ {
+ value = Default;
+ return IsDefault;
+ }
+
///
/// Parses agent output as structured JSON conforming to a specified schema.
/// Uses the model's native structured outputs capability to guarantee valid JSON
@@ -58,6 +71,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Structured))]
#endif
public bool IsStructured => Structured != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickStructured(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StructuredOutputParser? value)
+ {
+ value = Structured;
+ return IsStructured;
+ }
///
///
///
@@ -137,8 +163,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? @default = null,
- global::System.Func? structured = null,
+ global::System.Func? @default = null,
+ global::System.Func? structured = null,
bool validate = true)
{
if (validate)
@@ -162,8 +188,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? @default = null,
- global::System.Action? structured = null,
+ global::System.Action? @default = null,
+
+ global::System.Action? structured = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsDefault)
+ {
+ @default?.Invoke(Default!);
+ }
+ else if (IsStructured)
+ {
+ structured?.Invoke(Structured!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? @default = null,
+ global::System.Action? structured = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs
index 80b061f0..d3c22e18 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStepInstruction.g.cs
@@ -32,6 +32,19 @@ namespace Vectara
#endif
public bool IsReference => Reference != null;
+ ///
+ ///
+ ///
+ public bool TryPickReference(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ReferenceInstruction? value)
+ {
+ value = Reference;
+ return IsReference;
+ }
+
///
/// An instruction defined inline in the request.
///
@@ -48,6 +61,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Inline))]
#endif
public bool IsInline => Inline != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickInline(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineInstruction? value)
+ {
+ value = Inline;
+ return IsInline;
+ }
///
///
///
@@ -153,6 +179,30 @@ public bool Validate()
///
public void Match(
global::System.Action? reference = null,
+
+ global::System.Action? inline = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsReference)
+ {
+ reference?.Invoke(Reference!);
+ }
+ else if (IsInline)
+ {
+ inline?.Invoke(Inline!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? reference = null,
global::System.Action? inline = null,
bool validate = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs
index 105cbf85..5c4715ef 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStepReminder.g.cs
@@ -31,6 +31,19 @@ namespace Vectara
#endif
public bool IsTemplated => Templated != null;
+ ///
+ ///
+ ///
+ public bool TryPickTemplated(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.TemplatedReminder? value)
+ {
+ value = Templated;
+ return IsTemplated;
+ }
+
///
/// A reminder that expands terms, acronyms, and abbreviations in user messages using a glossary.
/// When attached to a step, user input is run through the glossary's lookup index and matching
@@ -49,6 +62,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GlossaryExpansion))]
#endif
public bool IsGlossaryExpansion => GlossaryExpansion != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickGlossaryExpansion(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.GlossaryExpansionReminder? value)
+ {
+ value = GlossaryExpansion;
+ return IsGlossaryExpansion;
+ }
///
///
///
@@ -128,8 +154,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? templated = null,
- global::System.Func? glossaryExpansion = null,
+ global::System.Func? templated = null,
+ global::System.Func? glossaryExpansion = null,
bool validate = true)
{
if (validate)
@@ -153,8 +179,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? templated = null,
- global::System.Action? glossaryExpansion = null,
+ global::System.Action? templated = null,
+
+ global::System.Action? glossaryExpansion = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsTemplated)
+ {
+ templated?.Invoke(Templated!);
+ }
+ else if (IsGlossaryExpansion)
+ {
+ glossaryExpansion?.Invoke(GlossaryExpansion!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? templated = null,
+ global::System.Action? glossaryExpansion = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs
index 4fe41929..6c7e4b8b 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentStreamedResponse.g.cs
@@ -31,6 +31,19 @@ namespace Vectara
#endif
public bool IsSkillLoad => SkillLoad != null;
+ ///
+ ///
+ ///
+ public bool TryPickSkillLoad(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.SkillLoadEvent? value)
+ {
+ value = SkillLoad;
+ return IsSkillLoad;
+ }
+
///
/// An event representing chain-of-thought thinking by the agent.
///
@@ -48,6 +61,19 @@ namespace Vectara
#endif
public bool IsThinking => Thinking != null;
+ ///
+ ///
+ ///
+ public bool TryPickThinking(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ThinkingEvent? value)
+ {
+ value = Thinking;
+ return IsThinking;
+ }
+
///
/// Event representing files uploaded to the agent workspace as artifacts.
/// This event is created when users upload one or more files to an agent session using multipart requests. The event becomes part of the session's conversation history and contains references to all artifacts that were uploaded in the request. Each uploaded file is assigned a unique artifact identifier and stored in the session's workspace.
@@ -68,6 +94,19 @@ namespace Vectara
#endif
public bool IsArtifactUpload => ArtifactUpload != null;
+ ///
+ ///
+ ///
+ public bool TryPickArtifactUpload(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ArtifactUploadEvent? value)
+ {
+ value = ArtifactUpload;
+ return IsArtifactUpload;
+ }
+
///
/// An input message event from a user.
///
@@ -85,6 +124,19 @@ namespace Vectara
#endif
public bool IsInputMessage => InputMessage != null;
+ ///
+ ///
+ ///
+ public bool TryPickInputMessage(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InputMessageEvent? value)
+ {
+ value = InputMessage;
+ return IsInputMessage;
+ }
+
///
/// A streaming chunk of agent output (SSE only, not stored).
///
@@ -102,6 +154,19 @@ namespace Vectara
#endif
public bool IsStreamingAgentOutput => StreamingAgentOutput != null;
+ ///
+ ///
+ ///
+ public bool TryPickStreamingAgentOutput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamingAgentOutput? value)
+ {
+ value = StreamingAgentOutput;
+ return IsStreamingAgentOutput;
+ }
+
///
/// Signals the end of streaming agent output (SSE only, not stored).
///
@@ -119,6 +184,19 @@ namespace Vectara
#endif
public bool IsStreamingAgentOutputEnd => StreamingAgentOutputEnd != null;
+ ///
+ ///
+ ///
+ public bool TryPickStreamingAgentOutputEnd(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamingAgentOutputEnd? value)
+ {
+ value = StreamingAgentOutputEnd;
+ return IsStreamingAgentOutputEnd;
+ }
+
///
/// A streaming chunk of agent thinking (SSE only, not stored).
///
@@ -136,6 +214,19 @@ namespace Vectara
#endif
public bool IsStreamingThinking => StreamingThinking != null;
+ ///
+ ///
+ ///
+ public bool TryPickStreamingThinking(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamingThinking? value)
+ {
+ value = StreamingThinking;
+ return IsStreamingThinking;
+ }
+
///
/// Signals the end of streaming thinking (SSE only, not stored).
///
@@ -153,6 +244,19 @@ namespace Vectara
#endif
public bool IsStreamingThinkingEnd => StreamingThinkingEnd != null;
+ ///
+ ///
+ ///
+ public bool TryPickStreamingThinkingEnd(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamingThinkingEnd? value)
+ {
+ value = StreamingThinkingEnd;
+ return IsStreamingThinkingEnd;
+ }
+
///
/// An event representing input to a tool call.
///
@@ -170,6 +274,19 @@ namespace Vectara
#endif
public bool IsToolInput => ToolInput != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolInput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ToolInputEvent? value)
+ {
+ value = ToolInput;
+ return IsToolInput;
+ }
+
///
/// An event representing output from a tool call.
///
@@ -187,6 +304,19 @@ namespace Vectara
#endif
public bool IsToolOutput => ToolOutput != null;
+ ///
+ ///
+ ///
+ public bool TryPickToolOutput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ToolOutputEvent? value)
+ {
+ value = ToolOutput;
+ return IsToolOutput;
+ }
+
///
/// An event representing a complete agent response with structured JSON content conforming to a schema.
/// This event is published instead of AgentOutputEvent when the agent's output_parser is configured
@@ -210,6 +340,19 @@ namespace Vectara
#endif
public bool IsStructuredOutput => StructuredOutput != null;
+ ///
+ ///
+ ///
+ public bool TryPickStructuredOutput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StructuredOutputEvent? value)
+ {
+ value = StructuredOutput;
+ return IsStructuredOutput;
+ }
+
///
/// A transient event indicating the current request exceeded the LLM's context limit.
/// This event is not persisted to the session history.
@@ -228,6 +371,19 @@ namespace Vectara
#endif
public bool IsContextLimitExceeded => ContextLimitExceeded != null;
+ ///
+ ///
+ ///
+ public bool TryPickContextLimitExceeded(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ContextLimitExceededEvent? value)
+ {
+ value = ContextLimitExceeded;
+ return IsContextLimitExceeded;
+ }
+
///
/// A transient event indicating the agent exceeded the maximum number of step transitions,
/// which may indicate an infinite loop between steps.
@@ -247,6 +403,19 @@ namespace Vectara
#endif
public bool IsStepTransitionLimitExceeded => StepTransitionLimitExceeded != null;
+ ///
+ ///
+ ///
+ public bool TryPickStepTransitionLimitExceeded(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StepTransitionLimitExceededEvent? value)
+ {
+ value = StepTransitionLimitExceeded;
+ return IsStepTransitionLimitExceeded;
+ }
+
///
/// A transient event indicating the agent session was interrupted by a user request.
/// This event is not persisted to the session history.
@@ -265,6 +434,19 @@ namespace Vectara
#endif
public bool IsSessionInterrupted => SessionInterrupted != null;
+ ///
+ ///
+ ///
+ public bool TryPickSessionInterrupted(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.SessionInterruptedEvent? value)
+ {
+ value = SessionInterrupted;
+ return IsSessionInterrupted;
+ }
+
///
/// An event representing an image being loaded into the conversation context for viewing and analysis.
///
@@ -282,6 +464,19 @@ namespace Vectara
#endif
public bool IsImageRead => ImageRead != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageRead(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ImageReadEvent? value)
+ {
+ value = ImageRead;
+ return IsImageRead;
+ }
+
///
/// An event representing a transition between agent steps.
///
@@ -299,6 +494,19 @@ namespace Vectara
#endif
public bool IsStepTransition => StepTransition != null;
+ ///
+ ///
+ ///
+ public bool TryPickStepTransition(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StepTransitionEvent? value)
+ {
+ value = StepTransition;
+ return IsStepTransition;
+ }
+
///
/// Token usage event reporting context window consumption.
///
@@ -316,6 +524,19 @@ namespace Vectara
#endif
public bool IsContextConsumed => ContextConsumed != null;
+ ///
+ ///
+ ///
+ public bool TryPickContextConsumed(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ContextConsumedEvent? value)
+ {
+ value = ContextConsumed;
+ return IsContextConsumed;
+ }
+
///
/// An event indicating that context compaction has started.
///
@@ -333,6 +554,19 @@ namespace Vectara
#endif
public bool IsCompactionStarted => CompactionStarted != null;
+ ///
+ ///
+ ///
+ public bool TryPickCompactionStarted(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CompactionStartedEvent? value)
+ {
+ value = CompactionStarted;
+ return IsCompactionStarted;
+ }
+
///
/// An event indicating that context compaction has completed.
///
@@ -350,6 +584,19 @@ namespace Vectara
#endif
public bool IsCompaction => Compaction != null;
+ ///
+ ///
+ ///
+ public bool TryPickCompaction(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CompactionEvent? value)
+ {
+ value = Compaction;
+ return IsCompaction;
+ }
+
///
/// Event signaling there was an error with the request.
///
@@ -367,6 +614,19 @@ namespace Vectara
#endif
public bool IsError => Error != null;
+ ///
+ ///
+ ///
+ public bool TryPickError(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamError? value)
+ {
+ value = Error;
+ return IsError;
+ }
+
///
/// The end of a query response stream.
///
@@ -383,6 +643,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(End))]
#endif
public bool IsEnd => End != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickEnd(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamResponseEnd? value)
+ {
+ value = End;
+ return IsEnd;
+ }
///
///
///
@@ -884,10 +1157,10 @@ public bool Validate()
global::System.Func? thinking = null,
global::System.Func? artifactUpload = null,
global::System.Func? inputMessage = null,
- global::System.Func? streamingAgentOutput = null,
- global::System.Func? streamingAgentOutputEnd = null,
- global::System.Func? streamingThinking = null,
- global::System.Func? streamingThinkingEnd = null,
+ global::System.Func? streamingAgentOutput = null,
+ global::System.Func? streamingAgentOutputEnd = null,
+ global::System.Func? streamingThinking = null,
+ global::System.Func? streamingThinkingEnd = null,
global::System.Func? toolInput = null,
global::System.Func? toolOutput = null,
global::System.Func? structuredOutput = null,
@@ -896,11 +1169,11 @@ public bool Validate()
global::System.Func? sessionInterrupted = null,
global::System.Func? imageRead = null,
global::System.Func? stepTransition = null,
- global::System.Func? contextConsumed = null,
+ global::System.Func? contextConsumed = null,
global::System.Func? compactionStarted = null,
global::System.Func? compaction = null,
- global::System.Func? error = null,
- global::System.Func? end = null,
+ global::System.Func? error = null,
+ global::System.Func? end = null,
bool validate = true)
{
if (validate)
@@ -1001,13 +1274,151 @@ public bool Validate()
///
public void Match(
global::System.Action? skillLoad = null,
+
+ global::System.Action? thinking = null,
+
+ global::System.Action? artifactUpload = null,
+
+ global::System.Action? inputMessage = null,
+
+ global::System.Action? streamingAgentOutput = null,
+
+ global::System.Action? streamingAgentOutputEnd = null,
+
+ global::System.Action? streamingThinking = null,
+
+ global::System.Action? streamingThinkingEnd = null,
+
+ global::System.Action? toolInput = null,
+
+ global::System.Action? toolOutput = null,
+
+ global::System.Action? structuredOutput = null,
+
+ global::System.Action? contextLimitExceeded = null,
+
+ global::System.Action? stepTransitionLimitExceeded = null,
+
+ global::System.Action? sessionInterrupted = null,
+
+ global::System.Action? imageRead = null,
+
+ global::System.Action? stepTransition = null,
+
+ global::System.Action? contextConsumed = null,
+
+ global::System.Action? compactionStarted = null,
+
+ global::System.Action? compaction = null,
+
+ global::System.Action? error = null,
+
+ global::System.Action? end = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSkillLoad)
+ {
+ skillLoad?.Invoke(SkillLoad!);
+ }
+ else if (IsThinking)
+ {
+ thinking?.Invoke(Thinking!);
+ }
+ else if (IsArtifactUpload)
+ {
+ artifactUpload?.Invoke(ArtifactUpload!);
+ }
+ else if (IsInputMessage)
+ {
+ inputMessage?.Invoke(InputMessage!);
+ }
+ else if (IsStreamingAgentOutput)
+ {
+ streamingAgentOutput?.Invoke(StreamingAgentOutput!);
+ }
+ else if (IsStreamingAgentOutputEnd)
+ {
+ streamingAgentOutputEnd?.Invoke(StreamingAgentOutputEnd!);
+ }
+ else if (IsStreamingThinking)
+ {
+ streamingThinking?.Invoke(StreamingThinking!);
+ }
+ else if (IsStreamingThinkingEnd)
+ {
+ streamingThinkingEnd?.Invoke(StreamingThinkingEnd!);
+ }
+ else if (IsToolInput)
+ {
+ toolInput?.Invoke(ToolInput!);
+ }
+ else if (IsToolOutput)
+ {
+ toolOutput?.Invoke(ToolOutput!);
+ }
+ else if (IsStructuredOutput)
+ {
+ structuredOutput?.Invoke(StructuredOutput!);
+ }
+ else if (IsContextLimitExceeded)
+ {
+ contextLimitExceeded?.Invoke(ContextLimitExceeded!);
+ }
+ else if (IsStepTransitionLimitExceeded)
+ {
+ stepTransitionLimitExceeded?.Invoke(StepTransitionLimitExceeded!);
+ }
+ else if (IsSessionInterrupted)
+ {
+ sessionInterrupted?.Invoke(SessionInterrupted!);
+ }
+ else if (IsImageRead)
+ {
+ imageRead?.Invoke(ImageRead!);
+ }
+ else if (IsStepTransition)
+ {
+ stepTransition?.Invoke(StepTransition!);
+ }
+ else if (IsContextConsumed)
+ {
+ contextConsumed?.Invoke(ContextConsumed!);
+ }
+ else if (IsCompactionStarted)
+ {
+ compactionStarted?.Invoke(CompactionStarted!);
+ }
+ else if (IsCompaction)
+ {
+ compaction?.Invoke(Compaction!);
+ }
+ else if (IsError)
+ {
+ error?.Invoke(Error!);
+ }
+ else if (IsEnd)
+ {
+ end?.Invoke(End!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? skillLoad = null,
global::System.Action? thinking = null,
global::System.Action? artifactUpload = null,
global::System.Action? inputMessage = null,
- global::System.Action? streamingAgentOutput = null,
- global::System.Action? streamingAgentOutputEnd = null,
- global::System.Action? streamingThinking = null,
- global::System.Action? streamingThinkingEnd = null,
+ global::System.Action? streamingAgentOutput = null,
+ global::System.Action? streamingAgentOutputEnd = null,
+ global::System.Action? streamingThinking = null,
+ global::System.Action? streamingThinkingEnd = null,
global::System.Action? toolInput = null,
global::System.Action? toolOutput = null,
global::System.Action? structuredOutput = null,
@@ -1016,11 +1427,11 @@ public void Match(
global::System.Action? sessionInterrupted = null,
global::System.Action? imageRead = null,
global::System.Action? stepTransition = null,
- global::System.Action? contextConsumed = null,
+ global::System.Action? contextConsumed = null,
global::System.Action? compactionStarted = null,
global::System.Action? compaction = null,
- global::System.Action? error = null,
- global::System.Action? end = null,
+ global::System.Action? error = null,
+ global::System.Action? end = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs
index f2191ac3..fe3cfc83 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfiguration.g.cs
@@ -32,6 +32,19 @@ namespace Vectara
#endif
public bool IsDynamicVectara => DynamicVectara != null;
+ ///
+ ///
+ ///
+ public bool TryPickDynamicVectara(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineDynamicVectaraToolConfiguration? value)
+ {
+ value = DynamicVectara;
+ return IsDynamicVectara;
+ }
+
///
/// An MCP tool configuration defined inline in the agent.
///
@@ -49,6 +62,19 @@ namespace Vectara
#endif
public bool IsMcp => Mcp != null;
+ ///
+ ///
+ ///
+ public bool TryPickMcp(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineMcpToolConfiguration? value)
+ {
+ value = Mcp;
+ return IsMcp;
+ }
+
///
/// A corpora search tool configuration defined inline in the agent.
///
@@ -66,6 +92,19 @@ namespace Vectara
#endif
public bool IsCorporaSearch => CorporaSearch != null;
+ ///
+ ///
+ ///
+ public bool TryPickCorporaSearch(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineCorporaSearchToolConfiguration? value)
+ {
+ value = CorporaSearch;
+ return IsCorporaSearch;
+ }
+
///
/// A web search tool configuration defined inline in the agent.
///
@@ -83,6 +122,19 @@ namespace Vectara
#endif
public bool IsWebSearch => WebSearch != null;
+ ///
+ ///
+ ///
+ public bool TryPickWebSearch(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineWebSearchToolConfiguration? value)
+ {
+ value = WebSearch;
+ return IsWebSearch;
+ }
+
///
/// A web get tool configuration defined inline in the agent for fetching content from URLs.
///
@@ -100,6 +152,19 @@ namespace Vectara
#endif
public bool IsWebGet => WebGet != null;
+ ///
+ ///
+ ///
+ public bool TryPickWebGet(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineWebGetToolConfiguration? value)
+ {
+ value = WebGet;
+ return IsWebGet;
+ }
+
///
/// A lambda tool configuration defined inline in the agent for executing user-defined functions.
///
@@ -117,6 +182,19 @@ namespace Vectara
#endif
public bool IsLambda => Lambda != null;
+ ///
+ ///
+ ///
+ public bool TryPickLambda(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineLambdaToolConfiguration? value)
+ {
+ value = Lambda;
+ return IsLambda;
+ }
+
///
/// A sub-agent tool configuration defined inline in the agent for invoking specialized sub-agents.
///
@@ -134,6 +212,19 @@ namespace Vectara
#endif
public bool IsSubAgent => SubAgent != null;
+ ///
+ ///
+ ///
+ public bool TryPickSubAgent(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineSubAgentToolConfiguration? value)
+ {
+ value = SubAgent;
+ return IsSubAgent;
+ }
+
///
/// An artifact create tool configuration defined inline in the agent for creating artifacts on-the-fly from text or structured data content.
///
@@ -151,6 +242,19 @@ namespace Vectara
#endif
public bool IsArtifactCreate => ArtifactCreate != null;
+ ///
+ ///
+ ///
+ public bool TryPickArtifactCreate(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineArtifactCreateToolConfiguration? value)
+ {
+ value = ArtifactCreate;
+ return IsArtifactCreate;
+ }
+
///
/// An artifact read tool configuration defined inline in the agent for reading artifacts from the session workspace.
///
@@ -168,6 +272,19 @@ namespace Vectara
#endif
public bool IsArtifactRead => ArtifactRead != null;
+ ///
+ ///
+ ///
+ public bool TryPickArtifactRead(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineArtifactReadToolConfiguration? value)
+ {
+ value = ArtifactRead;
+ return IsArtifactRead;
+ }
+
///
/// An artifact grep tool configuration defined inline in the agent for searching through artifact content.
///
@@ -185,6 +302,19 @@ namespace Vectara
#endif
public bool IsArtifactGrep => ArtifactGrep != null;
+ ///
+ ///
+ ///
+ public bool TryPickArtifactGrep(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineArtifactGrepToolConfiguration? value)
+ {
+ value = ArtifactGrep;
+ return IsArtifactGrep;
+ }
+
///
/// An image read tool configuration defined inline in the agent for loading images into the conversation context.
///
@@ -202,6 +332,19 @@ namespace Vectara
#endif
public bool IsImageRead => ImageRead != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageRead(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineImageReadToolConfiguration? value)
+ {
+ value = ImageRead;
+ return IsImageRead;
+ }
+
///
/// A document conversion tool configuration defined inline in the agent for converting document artifacts to various formats.
///
@@ -219,6 +362,19 @@ namespace Vectara
#endif
public bool IsDocumentConversion => DocumentConversion != null;
+ ///
+ ///
+ ///
+ public bool TryPickDocumentConversion(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineDocumentConversionToolConfiguration? value)
+ {
+ value = DocumentConversion;
+ return IsDocumentConversion;
+ }
+
///
/// A get document text tool configuration defined inline in the agent for fetching document text content from a corpus.
///
@@ -235,6 +391,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(GetDocumentText))]
#endif
public bool IsGetDocumentText => GetDocumentText != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickGetDocumentText(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InlineGetDocumentTextToolConfiguration? value)
+ {
+ value = GetDocumentText;
+ return IsGetDocumentText;
+ }
///
///
///
@@ -637,6 +806,96 @@ public bool Validate()
///
public void Match(
global::System.Action? dynamicVectara = null,
+
+ global::System.Action? mcp = null,
+
+ global::System.Action? corporaSearch = null,
+
+ global::System.Action? webSearch = null,
+
+ global::System.Action? webGet = null,
+
+ global::System.Action? lambda = null,
+
+ global::System.Action? subAgent = null,
+
+ global::System.Action? artifactCreate = null,
+
+ global::System.Action? artifactRead = null,
+
+ global::System.Action? artifactGrep = null,
+
+ global::System.Action? imageRead = null,
+
+ global::System.Action? documentConversion = null,
+
+ global::System.Action? getDocumentText = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsDynamicVectara)
+ {
+ dynamicVectara?.Invoke(DynamicVectara!);
+ }
+ else if (IsMcp)
+ {
+ mcp?.Invoke(Mcp!);
+ }
+ else if (IsCorporaSearch)
+ {
+ corporaSearch?.Invoke(CorporaSearch!);
+ }
+ else if (IsWebSearch)
+ {
+ webSearch?.Invoke(WebSearch!);
+ }
+ else if (IsWebGet)
+ {
+ webGet?.Invoke(WebGet!);
+ }
+ else if (IsLambda)
+ {
+ lambda?.Invoke(Lambda!);
+ }
+ else if (IsSubAgent)
+ {
+ subAgent?.Invoke(SubAgent!);
+ }
+ else if (IsArtifactCreate)
+ {
+ artifactCreate?.Invoke(ArtifactCreate!);
+ }
+ else if (IsArtifactRead)
+ {
+ artifactRead?.Invoke(ArtifactRead!);
+ }
+ else if (IsArtifactGrep)
+ {
+ artifactGrep?.Invoke(ArtifactGrep!);
+ }
+ else if (IsImageRead)
+ {
+ imageRead?.Invoke(ImageRead!);
+ }
+ else if (IsDocumentConversion)
+ {
+ documentConversion?.Invoke(DocumentConversion!);
+ }
+ else if (IsGetDocumentText)
+ {
+ getDocumentText?.Invoke(GetDocumentText!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? dynamicVectara = null,
global::System.Action? mcp = null,
global::System.Action? corporaSearch = null,
global::System.Action? webSearch = null,
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs
index 6d0cc85c..578e2e55 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AgentTraceSpan.g.cs
@@ -31,6 +31,19 @@ namespace Vectara
#endif
public bool IsInvokeAgent => InvokeAgent != null;
+ ///
+ ///
+ ///
+ public bool TryPickInvokeAgent(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.InvokeAgentTraceSpan? value)
+ {
+ value = InvokeAgent;
+ return IsInvokeAgent;
+ }
+
///
/// A span representing a single LLM chat completion call within an agent turn.
///
@@ -48,6 +61,19 @@ namespace Vectara
#endif
public bool IsChat => Chat != null;
+ ///
+ ///
+ ///
+ public bool TryPickChat(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ChatTraceSpan? value)
+ {
+ value = Chat;
+ return IsChat;
+ }
+
///
/// A span representing a tool execution within an agent turn.
///
@@ -65,6 +91,19 @@ namespace Vectara
#endif
public bool IsExecuteTool => ExecuteTool != null;
+ ///
+ ///
+ ///
+ public bool TryPickExecuteTool(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ExecuteToolTraceSpan? value)
+ {
+ value = ExecuteTool;
+ return IsExecuteTool;
+ }
+
///
/// A span representing extended thinking output from the LLM.
///
@@ -82,6 +121,19 @@ namespace Vectara
#endif
public bool IsThinking => Thinking != null;
+ ///
+ ///
+ ///
+ public bool TryPickThinking(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ThinkingTraceSpan? value)
+ {
+ value = Thinking;
+ return IsThinking;
+ }
+
///
/// A span representing the final text output of an agent turn.
///
@@ -99,6 +151,19 @@ namespace Vectara
#endif
public bool IsOutput => Output != null;
+ ///
+ ///
+ ///
+ public bool TryPickOutput(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.OutputTraceSpan? value)
+ {
+ value = Output;
+ return IsOutput;
+ }
+
///
/// A span representing a guardrail safety check on tool call results.
///
@@ -116,6 +181,19 @@ namespace Vectara
#endif
public bool IsGuardrail => Guardrail != null;
+ ///
+ ///
+ ///
+ public bool TryPickGuardrail(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.GuardrailTraceSpan? value)
+ {
+ value = Guardrail;
+ return IsGuardrail;
+ }
+
///
/// A span representing a transition between agent steps.
///
@@ -133,6 +211,19 @@ namespace Vectara
#endif
public bool IsStepTransition => StepTransition != null;
+ ///
+ ///
+ ///
+ public bool TryPickStepTransition(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StepTransitionTraceSpan? value)
+ {
+ value = StepTransition;
+ return IsStepTransition;
+ }
+
///
/// A span representing an image being loaded into conversation context.
///
@@ -150,6 +241,19 @@ namespace Vectara
#endif
public bool IsImageRead => ImageRead != null;
+ ///
+ ///
+ ///
+ public bool TryPickImageRead(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ImageReadTraceSpan? value)
+ {
+ value = ImageRead;
+ return IsImageRead;
+ }
+
///
/// A span representing context compaction (summarization of older conversation turns).
///
@@ -166,6 +270,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Compaction))]
#endif
public bool IsCompaction => Compaction != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCompaction(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CompactionTraceSpan? value)
+ {
+ value = Compaction;
+ return IsCompaction;
+ }
///
///
///
@@ -460,6 +577,72 @@ public bool Validate()
///
public void Match(
global::System.Action? invokeAgent = null,
+
+ global::System.Action? chat = null,
+
+ global::System.Action? executeTool = null,
+
+ global::System.Action? thinking = null,
+
+ global::System.Action? output = null,
+
+ global::System.Action? guardrail = null,
+
+ global::System.Action? stepTransition = null,
+
+ global::System.Action? imageRead = null,
+
+ global::System.Action? compaction = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsInvokeAgent)
+ {
+ invokeAgent?.Invoke(InvokeAgent!);
+ }
+ else if (IsChat)
+ {
+ chat?.Invoke(Chat!);
+ }
+ else if (IsExecuteTool)
+ {
+ executeTool?.Invoke(ExecuteTool!);
+ }
+ else if (IsThinking)
+ {
+ thinking?.Invoke(Thinking!);
+ }
+ else if (IsOutput)
+ {
+ output?.Invoke(Output!);
+ }
+ else if (IsGuardrail)
+ {
+ guardrail?.Invoke(Guardrail!);
+ }
+ else if (IsStepTransition)
+ {
+ stepTransition?.Invoke(StepTransition!);
+ }
+ else if (IsImageRead)
+ {
+ imageRead?.Invoke(ImageRead!);
+ }
+ else if (IsCompaction)
+ {
+ compaction?.Invoke(Compaction!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? invokeAgent = null,
global::System.Action? chat = null,
global::System.Action? executeTool = null,
global::System.Action? thinking = null,
diff --git a/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs
index 4437bf1b..1072d9c8 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.AnthropicAuth.g.cs
@@ -31,6 +31,19 @@ namespace Vectara
#endif
public bool IsBearer => Bearer != null;
+ ///
+ ///
+ ///
+ public bool TryPickBearer(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.BearerAuth? value)
+ {
+ value = Bearer;
+ return IsBearer;
+ }
+
///
/// Custom header-based authentication
///
@@ -48,6 +61,19 @@ namespace Vectara
#endif
public bool IsHeader => Header != null;
+ ///
+ ///
+ ///
+ public bool TryPickHeader(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.HeaderAuth? value)
+ {
+ value = Header;
+ return IsHeader;
+ }
+
///
/// AWS Bedrock authentication with explicit IAM credentials
///
@@ -65,6 +91,19 @@ namespace Vectara
#endif
public bool IsBedrockStaticIam => BedrockStaticIam != null;
+ ///
+ ///
+ ///
+ public bool TryPickBedrockStaticIam(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.BedrockStaticIAMAuth? value)
+ {
+ value = BedrockStaticIam;
+ return IsBedrockStaticIam;
+ }
+
///
/// AWS Bedrock API key authentication
///
@@ -82,6 +121,19 @@ namespace Vectara
#endif
public bool IsBedrockApiKey => BedrockApiKey != null;
+ ///
+ ///
+ ///
+ public bool TryPickBedrockApiKey(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.BedrockApiKeyAuth? value)
+ {
+ value = BedrockApiKey;
+ return IsBedrockApiKey;
+ }
+
///
/// Google Cloud Vertex AI service account authentication
///
@@ -99,6 +151,19 @@ namespace Vectara
#endif
public bool IsVertexServiceAccount => VertexServiceAccount != null;
+ ///
+ ///
+ ///
+ public bool TryPickVertexServiceAccount(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.VertexServiceAccountAuth? value)
+ {
+ value = VertexServiceAccount;
+ return IsVertexServiceAccount;
+ }
+
///
/// Google Cloud Vertex AI access token authentication
///
@@ -115,6 +180,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(VertexAccessToken))]
#endif
public bool IsVertexAccessToken => VertexAccessToken != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickVertexAccessToken(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.VertexAccessTokenAuth? value)
+ {
+ value = VertexAccessToken;
+ return IsVertexAccessToken;
+ }
///
///
///
@@ -282,12 +360,12 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? bearer = null,
- global::System.Func? header = null,
- global::System.Func? bedrockStaticIam = null,
- global::System.Func? bedrockApiKey = null,
- global::System.Func? vertexServiceAccount = null,
- global::System.Func? vertexAccessToken = null,
+ global::System.Func? bearer = null,
+ global::System.Func? header = null,
+ global::System.Func? bedrockStaticIam = null,
+ global::System.Func? bedrockApiKey = null,
+ global::System.Func? vertexServiceAccount = null,
+ global::System.Func? vertexAccessToken = null,
bool validate = true)
{
if (validate)
@@ -327,12 +405,60 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? bearer = null,
- global::System.Action? header = null,
- global::System.Action? bedrockStaticIam = null,
- global::System.Action? bedrockApiKey = null,
- global::System.Action? vertexServiceAccount = null,
- global::System.Action? vertexAccessToken = null,
+ global::System.Action? bearer = null,
+
+ global::System.Action? header = null,
+
+ global::System.Action? bedrockStaticIam = null,
+
+ global::System.Action? bedrockApiKey = null,
+
+ global::System.Action? vertexServiceAccount = null,
+
+ global::System.Action? vertexAccessToken = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsBearer)
+ {
+ bearer?.Invoke(Bearer!);
+ }
+ else if (IsHeader)
+ {
+ header?.Invoke(Header!);
+ }
+ else if (IsBedrockStaticIam)
+ {
+ bedrockStaticIam?.Invoke(BedrockStaticIam!);
+ }
+ else if (IsBedrockApiKey)
+ {
+ bedrockApiKey?.Invoke(BedrockApiKey!);
+ }
+ else if (IsVertexServiceAccount)
+ {
+ vertexServiceAccount?.Invoke(VertexServiceAccount!);
+ }
+ else if (IsVertexAccessToken)
+ {
+ vertexAccessToken?.Invoke(VertexAccessToken!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? bearer = null,
+ global::System.Action? header = null,
+ global::System.Action? bedrockStaticIam = null,
+ global::System.Action? bedrockApiKey = null,
+ global::System.Action? vertexServiceAccount = null,
+ global::System.Action? vertexAccessToken = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs
index 7defb0d4..3b6d3795 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactCreateTool.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsBase => Base != null;
+ ///
+ ///
+ ///
+ public bool TryPickBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ToolBase? value)
+ {
+ value = Base;
+ return IsBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ArtifactCreateToolVariant2))]
#endif
public bool IsArtifactCreateToolVariant2 => ArtifactCreateToolVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickArtifactCreateToolVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ArtifactCreateToolVariant2? value)
+ {
+ value = ArtifactCreateToolVariant2;
+ return IsArtifactCreateToolVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? @base = null,
- global::System.Func? artifactCreateToolVariant2 = null,
+ global::System.Func? @base = null,
+ global::System.Func? artifactCreateToolVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? @base = null,
- global::System.Action? artifactCreateToolVariant2 = null,
+ global::System.Action? @base = null,
+
+ global::System.Action? artifactCreateToolVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsBase)
+ {
+ @base?.Invoke(Base!);
+ }
+ else if (IsArtifactCreateToolVariant2)
+ {
+ artifactCreateToolVariant2?.Invoke(ArtifactCreateToolVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? @base = null,
+ global::System.Action? artifactCreateToolVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs
index 2494484c..a644bfc0 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactGrepTool.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsBase => Base != null;
+ ///
+ ///
+ ///
+ public bool TryPickBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ToolBase? value)
+ {
+ value = Base;
+ return IsBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ArtifactGrepToolVariant2))]
#endif
public bool IsArtifactGrepToolVariant2 => ArtifactGrepToolVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickArtifactGrepToolVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ArtifactGrepToolVariant2? value)
+ {
+ value = ArtifactGrepToolVariant2;
+ return IsArtifactGrepToolVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? @base = null,
- global::System.Func? artifactGrepToolVariant2 = null,
+ global::System.Func? @base = null,
+ global::System.Func? artifactGrepToolVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? @base = null,
- global::System.Action? artifactGrepToolVariant2 = null,
+ global::System.Action? @base = null,
+
+ global::System.Action? artifactGrepToolVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsBase)
+ {
+ @base?.Invoke(Base!);
+ }
+ else if (IsArtifactGrepToolVariant2)
+ {
+ artifactGrepToolVariant2?.Invoke(ArtifactGrepToolVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? @base = null,
+ global::System.Action? artifactGrepToolVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs
index cc7b33f4..3a3b849c 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReadTool.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsBase => Base != null;
+ ///
+ ///
+ ///
+ public bool TryPickBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ToolBase? value)
+ {
+ value = Base;
+ return IsBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ArtifactReadToolVariant2))]
#endif
public bool IsArtifactReadToolVariant2 => ArtifactReadToolVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickArtifactReadToolVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ArtifactReadToolVariant2? value)
+ {
+ value = ArtifactReadToolVariant2;
+ return IsArtifactReadToolVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? @base = null,
- global::System.Func? artifactReadToolVariant2 = null,
+ global::System.Func? @base = null,
+ global::System.Func? artifactReadToolVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? @base = null,
- global::System.Action? artifactReadToolVariant2 = null,
+ global::System.Action? @base = null,
+
+ global::System.Action? artifactReadToolVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsBase)
+ {
+ @base?.Invoke(Base!);
+ }
+ else if (IsArtifactReadToolVariant2)
+ {
+ artifactReadToolVariant2?.Invoke(ArtifactReadToolVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? @base = null,
+ global::System.Action? artifactReadToolVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs
index a60bc507..4cf7457d 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactUploadEvent.g.cs
@@ -29,6 +29,19 @@ namespace Vectara
#endif
public bool IsAgentBase => AgentBase != null;
+ ///
+ ///
+ ///
+ public bool TryPickAgentBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentEventBase? value)
+ {
+ value = AgentBase;
+ return IsAgentBase;
+ }
+
///
///
///
@@ -45,6 +58,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ArtifactUploadEventVariant2))]
#endif
public bool IsArtifactUploadEventVariant2 => ArtifactUploadEventVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickArtifactUploadEventVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ArtifactUploadEventVariant2? value)
+ {
+ value = ArtifactUploadEventVariant2;
+ return IsArtifactUploadEventVariant2;
+ }
///
///
///
@@ -121,8 +147,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? agentBase = null,
- global::System.Func? artifactUploadEventVariant2 = null,
+ global::System.Func? agentBase = null,
+ global::System.Func? artifactUploadEventVariant2 = null,
bool validate = true)
{
if (validate)
@@ -146,8 +172,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? agentBase = null,
- global::System.Action? artifactUploadEventVariant2 = null,
+ global::System.Action? agentBase = null,
+
+ global::System.Action? artifactUploadEventVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAgentBase)
+ {
+ agentBase?.Invoke(AgentBase!);
+ }
+ else if (IsArtifactUploadEventVariant2)
+ {
+ artifactUploadEventVariant2?.Invoke(ArtifactUploadEventVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? agentBase = null,
+ global::System.Action? artifactUploadEventVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs
index 62188470..4a4872d6 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.BulkDeleteDocumentsResponse.g.cs
@@ -46,6 +46,19 @@ namespace Vectara
#endif
public bool IsAsync => Async != null;
+ ///
+ ///
+ ///
+ public bool TryPickAsync(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.BulkDeleteAsyncResponse? value)
+ {
+ value = Async;
+ return IsAsync;
+ }
+
///
/// Response when async=false and operation completes successfully (HTTP 200).
///
@@ -62,6 +75,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Success))]
#endif
public bool IsSuccess => Success != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickSuccess(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.BulkDeleteSyncSuccessResponse? value)
+ {
+ value = Success;
+ return IsSuccess;
+ }
///
///
///
@@ -141,8 +167,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? async = null,
- global::System.Func? success = null,
+ global::System.Func? async = null,
+ global::System.Func? success = null,
bool validate = true)
{
if (validate)
@@ -166,8 +192,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? async = null,
- global::System.Action? success = null,
+ global::System.Action? async = null,
+
+ global::System.Action? success = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAsync)
+ {
+ async?.Invoke(Async!);
+ }
+ else if (IsSuccess)
+ {
+ success?.Invoke(Success!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? async = null,
+ global::System.Action? success = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs
index fe433129..1872dec0 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ChatStreamedResponse.g.cs
@@ -31,6 +31,19 @@ namespace Vectara
#endif
public bool IsSearchResults => SearchResults != null;
+ ///
+ ///
+ ///
+ public bool TryPickSearchResults(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamSearchResponse? value)
+ {
+ value = SearchResults;
+ return IsSearchResults;
+ }
+
///
/// Information about the chat.
///
@@ -48,6 +61,19 @@ namespace Vectara
#endif
public bool IsChatInfo => ChatInfo != null;
+ ///
+ ///
+ ///
+ public bool TryPickChatInfo(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ChatInfoResponse? value)
+ {
+ value = ChatInfo;
+ return IsChatInfo;
+ }
+
///
/// The chunk response from the generation, which may be a partial generation.
///
@@ -65,6 +91,19 @@ namespace Vectara
#endif
public bool IsGenerationChunk => GenerationChunk != null;
+ ///
+ ///
+ ///
+ public bool TryPickGenerationChunk(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamGenerationChunk? value)
+ {
+ value = GenerationChunk;
+ return IsGenerationChunk;
+ }
+
///
/// The end of generation. There may still be more information such as the factual consistency score, but generation has stopped.
///
@@ -82,6 +121,19 @@ namespace Vectara
#endif
public bool IsGenerationEnd => GenerationEnd != null;
+ ///
+ ///
+ ///
+ public bool TryPickGenerationEnd(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamGenerationEnd? value)
+ {
+ value = GenerationEnd;
+ return IsGenerationEnd;
+ }
+
///
/// Event containing information on how the generation was accomplished.
///
@@ -99,6 +151,19 @@ namespace Vectara
#endif
public bool IsGenerationInfo => GenerationInfo != null;
+ ///
+ ///
+ ///
+ public bool TryPickGenerationInfo(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.GenerationInfo? value)
+ {
+ value = GenerationInfo;
+ return IsGenerationInfo;
+ }
+
///
/// Event containing the factual consistency score.
///
@@ -116,6 +181,19 @@ namespace Vectara
#endif
public bool IsFactualConsistencyScore => FactualConsistencyScore != null;
+ ///
+ ///
+ ///
+ public bool TryPickFactualConsistencyScore(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.FactualConsistencyScore? value)
+ {
+ value = FactualConsistencyScore;
+ return IsFactualConsistencyScore;
+ }
+
///
/// The end of a query response stream.
///
@@ -133,6 +211,19 @@ namespace Vectara
#endif
public bool IsEnd => End != null;
+ ///
+ ///
+ ///
+ public bool TryPickEnd(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamResponseEnd? value)
+ {
+ value = End;
+ return IsEnd;
+ }
+
///
/// Event signaling there was an error with the request.
///
@@ -149,6 +240,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Error))]
#endif
public bool IsError => Error != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickError(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StreamError? value)
+ {
+ value = Error;
+ return IsError;
+ }
///
///
///
@@ -360,14 +464,14 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? searchResults = null,
- global::System.Func? chatInfo = null,
- global::System.Func? generationChunk = null,
- global::System.Func? generationEnd = null,
- global::System.Func? generationInfo = null,
- global::System.Func? factualConsistencyScore = null,
- global::System.Func? end = null,
- global::System.Func? error = null,
+ global::System.Func? searchResults = null,
+ global::System.Func? chatInfo = null,
+ global::System.Func? generationChunk = null,
+ global::System.Func? generationEnd = null,
+ global::System.Func? generationInfo = null,
+ global::System.Func? factualConsistencyScore = null,
+ global::System.Func? end = null,
+ global::System.Func? error = null,
bool validate = true)
{
if (validate)
@@ -415,14 +519,74 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? searchResults = null,
- global::System.Action? chatInfo = null,
- global::System.Action? generationChunk = null,
- global::System.Action? generationEnd = null,
- global::System.Action? generationInfo = null,
- global::System.Action? factualConsistencyScore = null,
- global::System.Action? end = null,
- global::System.Action? error = null,
+ global::System.Action? searchResults = null,
+
+ global::System.Action? chatInfo = null,
+
+ global::System.Action? generationChunk = null,
+
+ global::System.Action? generationEnd = null,
+
+ global::System.Action? generationInfo = null,
+
+ global::System.Action? factualConsistencyScore = null,
+
+ global::System.Action? end = null,
+
+ global::System.Action? error = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSearchResults)
+ {
+ searchResults?.Invoke(SearchResults!);
+ }
+ else if (IsChatInfo)
+ {
+ chatInfo?.Invoke(ChatInfo!);
+ }
+ else if (IsGenerationChunk)
+ {
+ generationChunk?.Invoke(GenerationChunk!);
+ }
+ else if (IsGenerationEnd)
+ {
+ generationEnd?.Invoke(GenerationEnd!);
+ }
+ else if (IsGenerationInfo)
+ {
+ generationInfo?.Invoke(GenerationInfo!);
+ }
+ else if (IsFactualConsistencyScore)
+ {
+ factualConsistencyScore?.Invoke(FactualConsistencyScore!);
+ }
+ else if (IsEnd)
+ {
+ end?.Invoke(End!);
+ }
+ else if (IsError)
+ {
+ error?.Invoke(Error!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? searchResults = null,
+ global::System.Action? chatInfo = null,
+ global::System.Action? generationChunk = null,
+ global::System.Action? generationEnd = null,
+ global::System.Action? generationInfo = null,
+ global::System.Action? factualConsistencyScore = null,
+ global::System.Action? end = null,
+ global::System.Action? error = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs
index df6f0eb5..1b493b55 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ChatTraceSpan.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsAgentBase => AgentBase != null;
+ ///
+ ///
+ ///
+ public bool TryPickAgentBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentTraceSpanBase? value)
+ {
+ value = AgentBase;
+ return IsAgentBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ChatTraceSpanVariant2))]
#endif
public bool IsChatTraceSpanVariant2 => ChatTraceSpanVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickChatTraceSpanVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ChatTraceSpanVariant2? value)
+ {
+ value = ChatTraceSpanVariant2;
+ return IsChatTraceSpanVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? agentBase = null,
- global::System.Func? chatTraceSpanVariant2 = null,
+ global::System.Func? agentBase = null,
+ global::System.Func? chatTraceSpanVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? agentBase = null,
- global::System.Action? chatTraceSpanVariant2 = null,
+ global::System.Action? agentBase = null,
+
+ global::System.Action? chatTraceSpanVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAgentBase)
+ {
+ agentBase?.Invoke(AgentBase!);
+ }
+ else if (IsChatTraceSpanVariant2)
+ {
+ chatTraceSpanVariant2?.Invoke(ChatTraceSpanVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? agentBase = null,
+ global::System.Action? chatTraceSpanVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs
index f24268da..a9f38284 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ChunkingStrategy.g.cs
@@ -31,6 +31,19 @@ namespace Vectara
#endif
public bool IsMaxCharsChunkingStrategy => MaxCharsChunkingStrategy != null;
+ ///
+ ///
+ ///
+ public bool TryPickMaxCharsChunkingStrategy(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.MaxCharsChunkingStrategy? value)
+ {
+ value = MaxCharsChunkingStrategy;
+ return IsMaxCharsChunkingStrategy;
+ }
+
///
/// Sets a chunking strategy that creates one chunk per sentence. This is the default strategy used when no chunking strategy is specified.
///
@@ -47,6 +60,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(SentenceChunkingStrategy))]
#endif
public bool IsSentenceChunkingStrategy => SentenceChunkingStrategy != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickSentenceChunkingStrategy(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.SentenceChunkingStrategy? value)
+ {
+ value = SentenceChunkingStrategy;
+ return IsSentenceChunkingStrategy;
+ }
///
///
///
@@ -126,8 +152,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? maxCharsChunkingStrategy = null,
- global::System.Func? sentenceChunkingStrategy = null,
+ global::System.Func? maxCharsChunkingStrategy = null,
+ global::System.Func? sentenceChunkingStrategy = null,
bool validate = true)
{
if (validate)
@@ -151,8 +177,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? maxCharsChunkingStrategy = null,
- global::System.Action? sentenceChunkingStrategy = null,
+ global::System.Action? maxCharsChunkingStrategy = null,
+
+ global::System.Action? sentenceChunkingStrategy = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsMaxCharsChunkingStrategy)
+ {
+ maxCharsChunkingStrategy?.Invoke(MaxCharsChunkingStrategy!);
+ }
+ else if (IsSentenceChunkingStrategy)
+ {
+ sentenceChunkingStrategy?.Invoke(SentenceChunkingStrategy!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? maxCharsChunkingStrategy = null,
+ global::System.Action? sentenceChunkingStrategy = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs
index dfd32682..958e8a40 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionEvent.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsAgentBase => AgentBase != null;
+ ///
+ ///
+ ///
+ public bool TryPickAgentBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentEventBase? value)
+ {
+ value = AgentBase;
+ return IsAgentBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CompactionEventVariant2))]
#endif
public bool IsCompactionEventVariant2 => CompactionEventVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCompactionEventVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CompactionEventVariant2? value)
+ {
+ value = CompactionEventVariant2;
+ return IsCompactionEventVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? agentBase = null,
- global::System.Func? compactionEventVariant2 = null,
+ global::System.Func? agentBase = null,
+ global::System.Func? compactionEventVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? agentBase = null,
- global::System.Action? compactionEventVariant2 = null,
+ global::System.Action? agentBase = null,
+
+ global::System.Action? compactionEventVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAgentBase)
+ {
+ agentBase?.Invoke(AgentBase!);
+ }
+ else if (IsCompactionEventVariant2)
+ {
+ compactionEventVariant2?.Invoke(CompactionEventVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? agentBase = null,
+ global::System.Action? compactionEventVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs
index 52091156..105aab88 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionStartedEvent.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsAgentBase => AgentBase != null;
+ ///
+ ///
+ ///
+ public bool TryPickAgentBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentEventBase? value)
+ {
+ value = AgentBase;
+ return IsAgentBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CompactionStartedEventVariant2))]
#endif
public bool IsCompactionStartedEventVariant2 => CompactionStartedEventVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCompactionStartedEventVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CompactionStartedEventVariant2? value)
+ {
+ value = CompactionStartedEventVariant2;
+ return IsCompactionStartedEventVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? agentBase = null,
- global::System.Func? compactionStartedEventVariant2 = null,
+ global::System.Func? agentBase = null,
+ global::System.Func? compactionStartedEventVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? agentBase = null,
- global::System.Action? compactionStartedEventVariant2 = null,
+ global::System.Action? agentBase = null,
+
+ global::System.Action? compactionStartedEventVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAgentBase)
+ {
+ agentBase?.Invoke(AgentBase!);
+ }
+ else if (IsCompactionStartedEventVariant2)
+ {
+ compactionStartedEventVariant2?.Invoke(CompactionStartedEventVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? agentBase = null,
+ global::System.Action? compactionStartedEventVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs
index 65b80597..cc2cb6c3 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.CompactionTraceSpan.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsAgentBase => AgentBase != null;
+ ///
+ ///
+ ///
+ public bool TryPickAgentBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentTraceSpanBase? value)
+ {
+ value = AgentBase;
+ return IsAgentBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CompactionTraceSpanVariant2))]
#endif
public bool IsCompactionTraceSpanVariant2 => CompactionTraceSpanVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCompactionTraceSpanVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CompactionTraceSpanVariant2? value)
+ {
+ value = CompactionTraceSpanVariant2;
+ return IsCompactionTraceSpanVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? agentBase = null,
- global::System.Func? compactionTraceSpanVariant2 = null,
+ global::System.Func? agentBase = null,
+ global::System.Func? compactionTraceSpanVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? agentBase = null,
- global::System.Action? compactionTraceSpanVariant2 = null,
+ global::System.Action? agentBase = null,
+
+ global::System.Action? compactionTraceSpanVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAgentBase)
+ {
+ agentBase?.Invoke(AgentBase!);
+ }
+ else if (IsCompactionTraceSpanVariant2)
+ {
+ compactionTraceSpanVariant2?.Invoke(CompactionTraceSpanVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? agentBase = null,
+ global::System.Action? compactionTraceSpanVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs
index 8c94fc08..bddc84f0 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ConnectorConfiguration.g.cs
@@ -30,6 +30,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Slack))]
#endif
public bool IsSlack => Slack != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickSlack(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.SlackConnectorConfiguration? value)
+ {
+ value = Slack;
+ return IsSlack;
+ }
///
///
///
@@ -87,7 +100,7 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? slack = null,
+ global::System.Func? slack = null,
bool validate = true)
{
if (validate)
@@ -107,7 +120,25 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? slack = null,
+ global::System.Action? slack = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSlack)
+ {
+ slack?.Invoke(Slack!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? slack = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs
index 71448348..a1d1aa15 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.ContextLimitExceededEvent.g.cs
@@ -27,6 +27,19 @@ namespace Vectara
#endif
public bool IsAgentBase => AgentBase != null;
+ ///
+ ///
+ ///
+ public bool TryPickAgentBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.AgentEventBase? value)
+ {
+ value = AgentBase;
+ return IsAgentBase;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ContextLimitExceededEventVariant2))]
#endif
public bool IsContextLimitExceededEventVariant2 => ContextLimitExceededEventVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickContextLimitExceededEventVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ContextLimitExceededEventVariant2? value)
+ {
+ value = ContextLimitExceededEventVariant2;
+ return IsContextLimitExceededEventVariant2;
+ }
///
///
///
@@ -119,8 +145,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? agentBase = null,
- global::System.Func? contextLimitExceededEventVariant2 = null,
+ global::System.Func? agentBase = null,
+ global::System.Func? contextLimitExceededEventVariant2 = null,
bool validate = true)
{
if (validate)
@@ -144,8 +170,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? agentBase = null,
- global::System.Action? contextLimitExceededEventVariant2 = null,
+ global::System.Action? agentBase = null,
+
+ global::System.Action? contextLimitExceededEventVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsAgentBase)
+ {
+ agentBase?.Invoke(AgentBase!);
+ }
+ else if (IsContextLimitExceededEventVariant2)
+ {
+ contextLimitExceededEventVariant2?.Invoke(ContextLimitExceededEventVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? agentBase = null,
+ global::System.Action? contextLimitExceededEventVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs
index ef7ba11c..6b53cb3c 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.CorporaSearchTool.g.cs
@@ -26,6 +26,19 @@ namespace Vectara
#endif
public bool IsBase => Base != null;
+ ///
+ ///
+ ///
+ public bool TryPickBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.ToolBase? value)
+ {
+ value = Base;
+ return IsBase;
+ }
+
///
///
///
@@ -42,6 +55,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CorporaSearchToolVariant2))]
#endif
public bool IsCorporaSearchToolVariant2 => CorporaSearchToolVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCorporaSearchToolVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CorporaSearchToolVariant2? value)
+ {
+ value = CorporaSearchToolVariant2;
+ return IsCorporaSearchToolVariant2;
+ }
///
///
///
@@ -118,8 +144,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? @base = null,
- global::System.Func? corporaSearchToolVariant2 = null,
+ global::System.Func? @base = null,
+ global::System.Func? corporaSearchToolVariant2 = null,
bool validate = true)
{
if (validate)
@@ -143,8 +169,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? @base = null,
- global::System.Action? corporaSearchToolVariant2 = null,
+ global::System.Action? @base = null,
+
+ global::System.Action? corporaSearchToolVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsBase)
+ {
+ @base?.Invoke(Base!);
+ }
+ else if (IsCorporaSearchToolVariant2)
+ {
+ corporaSearchToolVariant2?.Invoke(CorporaSearchToolVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? @base = null,
+ global::System.Action? corporaSearchToolVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs
index 02dae3f1..7d19f15e 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAppClientRequest.g.cs
@@ -30,6 +30,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(ClientCredentials))]
#endif
public bool IsClientCredentials => ClientCredentials != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickClientCredentials(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CreateClientCredentialsRequest? value)
+ {
+ value = ClientCredentials;
+ return IsClientCredentials;
+ }
///
///
///
@@ -87,7 +100,7 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? clientCredentials = null,
+ global::System.Func? clientCredentials = null,
bool validate = true)
{
if (validate)
@@ -107,7 +120,25 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? clientCredentials = null,
+ global::System.Action? clientCredentials = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsClientCredentials)
+ {
+ clientCredentials?.Invoke(ClientCredentials!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? clientCredentials = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs
index 67228484..55264511 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.CreateCompactRequest.g.cs
@@ -27,6 +27,19 @@ namespace Vectara
#endif
public bool IsInputBase => InputBase != null;
+ ///
+ ///
+ ///
+ public bool TryPickInputBase(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CreateInputRequestBase? value)
+ {
+ value = InputBase;
+ return IsInputBase;
+ }
+
///
///
///
@@ -43,6 +56,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(CreateCompactRequestVariant2))]
#endif
public bool IsCreateCompactRequestVariant2 => CreateCompactRequestVariant2 != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickCreateCompactRequestVariant2(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CreateCompactRequestVariant2? value)
+ {
+ value = CreateCompactRequestVariant2;
+ return IsCreateCompactRequestVariant2;
+ }
///
///
///
@@ -119,8 +145,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? inputBase = null,
- global::System.Func? createCompactRequestVariant2 = null,
+ global::System.Func? inputBase = null,
+ global::System.Func? createCompactRequestVariant2 = null,
bool validate = true)
{
if (validate)
@@ -144,8 +170,32 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? inputBase = null,
- global::System.Action? createCompactRequestVariant2 = null,
+ global::System.Action? inputBase = null,
+
+ global::System.Action? createCompactRequestVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsInputBase)
+ {
+ inputBase?.Invoke(InputBase!);
+ }
+ else if (IsCreateCompactRequestVariant2)
+ {
+ createCompactRequestVariant2?.Invoke(CreateCompactRequestVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public void Switch(
+ global::System.Action? inputBase = null,
+ global::System.Action? createCompactRequestVariant2 = null,
bool validate = true)
{
if (validate)
diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs
index 7139371e..e8214f4c 100644
--- a/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.Models.CreateDocumentRequest.g.cs
@@ -33,6 +33,19 @@ namespace Vectara
#endif
public bool IsCore => Core != null;
+ ///
+ ///
+ ///
+ public bool TryPickCore(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.CoreDocument? value)
+ {
+ value = Core;
+ return IsCore;
+ }
+
///
/// A document with layout features.
///
@@ -49,6 +62,19 @@ namespace Vectara
[global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Structured))]
#endif
public bool IsStructured => Structured != null;
+
+ ///
+ ///
+ ///
+ public bool TryPickStructured(
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)]
+#endif
+ out global::Vectara.StructuredDocument? value)
+ {
+ value = Structured;
+ return IsStructured;
+ }
///
///
///
@@ -128,8 +154,8 @@ public bool Validate()
///
///
public TResult? Match(
- global::System.Func? core = null,
- global::System.Func? structured = null,
+ global::System.Func? core = null,
+ global::System.Func