diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs index 5610a6e0..4bb317c3 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs @@ -688,18 +688,23 @@ partial void ProcessCreateResponseContent( /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateAsync( string name, - object toolConfigurations, + global::System.Collections.Generic.Dictionary toolConfigurations, global::Vectara.AgentModel model, int? requestTimeout = default, int? requestTimeoutMillis = default, diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs index 74322c80..5c6fc5d5 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs @@ -676,11 +676,16 @@ partial void ProcessReplaceResponseContent( /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -688,7 +693,7 @@ partial void ProcessReplaceResponseContent( public async global::System.Threading.Tasks.Task ReplaceAsync( string agentKey, string name, - object toolConfigurations, + global::System.Collections.Generic.Dictionary toolConfigurations, global::Vectara.AgentModel model, int? requestTimeout = default, int? requestTimeoutMillis = default, diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs index 9795ac3c..b608f745 100644 --- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs @@ -666,11 +666,16 @@ partial void ProcessUpdateResponseContent( /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// /// /// A map of additional named steps keyed by step name for partial update.
@@ -687,7 +692,7 @@ partial void ProcessUpdateResponseContent( int? requestTimeoutMillis = default, string? name = default, string? description = default, - object? toolConfigurations = default, + global::System.Collections.Generic.Dictionary? toolConfigurations = default, global::System.Collections.Generic.Dictionary? skills = default, global::Vectara.AgentModel? model = default, global::Vectara.UpdateFirstAgentStep? firstStep = default, diff --git a/src/libs/Vectara/Generated/Vectara.IAgentsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.Create.g.cs index 62ba658e..3098470d 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentsClient.Create.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.Create.g.cs @@ -166,18 +166,23 @@ public partial interface IAgentsClient /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateAsync( string name, - object toolConfigurations, + global::System.Collections.Generic.Dictionary toolConfigurations, global::Vectara.AgentModel model, int? requestTimeout = default, int? requestTimeoutMillis = default, diff --git a/src/libs/Vectara/Generated/Vectara.IAgentsClient.Replace.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.Replace.g.cs index c7b72077..1abe06e4 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentsClient.Replace.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.Replace.g.cs @@ -111,11 +111,16 @@ public partial interface IAgentsClient /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with @@ -123,7 +128,7 @@ public partial interface IAgentsClient global::System.Threading.Tasks.Task ReplaceAsync( string agentKey, string name, - object toolConfigurations, + global::System.Collections.Generic.Dictionary toolConfigurations, global::Vectara.AgentModel model, int? requestTimeout = default, int? requestTimeoutMillis = default, diff --git a/src/libs/Vectara/Generated/Vectara.IAgentsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.IAgentsClient.Update.g.cs index 4922df2a..82b810ea 100644 --- a/src/libs/Vectara/Generated/Vectara.IAgentsClient.Update.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IAgentsClient.Update.g.cs @@ -101,11 +101,16 @@ public partial interface IAgentsClient /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// /// /// A map of additional named steps keyed by step name for partial update.
@@ -122,7 +127,7 @@ public partial interface IAgentsClient int? requestTimeoutMillis = default, string? name = default, string? description = default, - object? toolConfigurations = default, + global::System.Collections.Generic.Dictionary? toolConfigurations = default, global::System.Collections.Generic.Dictionary? skills = default, global::Vectara.AgentModel? model = default, global::Vectara.UpdateFirstAgentStep? firstStep = default, diff --git a/src/libs/Vectara/Generated/Vectara.IPipelineDeadLetterEntriesClient.Process.g.cs b/src/libs/Vectara/Generated/Vectara.IPipelineDeadLetterEntriesClient.Process.g.cs index df435982..a218e212 100644 --- a/src/libs/Vectara/Generated/Vectara.IPipelineDeadLetterEntriesClient.Process.g.cs +++ b/src/libs/Vectara/Generated/Vectara.IPipelineDeadLetterEntriesClient.Process.g.cs @@ -62,7 +62,7 @@ public partial interface IPipelineDeadLetterEntriesClient /// Specific source record IDs to process. If omitted, processes all matching dead letters. /// /// - /// Only process dead letters from this specific run. + /// Only process dead letters whose `last_run_id` matches this value. /// /// /// How this dead letter was created. diff --git a/src/libs/Vectara/Generated/Vectara.IPipelineRunsClient.Cancel.g.cs b/src/libs/Vectara/Generated/Vectara.IPipelineRunsClient.Cancel.g.cs new file mode 100644 index 00000000..7b74aa71 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.IPipelineRunsClient.Cancel.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace Vectara +{ + public partial interface IPipelineRunsClient + { + /// + /// Cancel pipeline run
+ /// Request cancellation of an in-progress pipeline run. The run is asked to stop at the next checkpoint; it may take a moment to transition to the cancelled state. Runs that have already completed, failed, or been cancelled cannot be cancelled again. + ///
+ /// + /// + /// + /// The unique key for the pipeline. Can be user-provided or auto-generated.
+ /// Example: sharepoint-legal-ingest + /// + /// + /// The unique identifier for a pipeline run.
+ /// Example: run_pip_abc_manual_550e8400 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CancelAsync( + string pipelineKey, + string runId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Cancel pipeline run
+ /// Request cancellation of an in-progress pipeline run. The run is asked to stop at the next checkpoint; it may take a moment to transition to the cancelled state. Runs that have already completed, failed, or been cancelled cannot be cancelled again. + ///
+ /// + /// + /// + /// The unique key for the pipeline. Can be user-provided or auto-generated.
+ /// Example: sharepoint-legal-ingest + /// + /// + /// The unique identifier for a pipeline run.
+ /// Example: run_pip_abc_manual_550e8400 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CancelAsResponseAsync( + string pipelineKey, + string runId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentToolConfiguration.g.cs index 5f29d44d..e9c373df 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.AgentToolConfiguration.g.cs @@ -156,81 +156,81 @@ public override void Write( if (value.IsDynamicVectara) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDynamicVectaraToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDynamicVectaraToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineDynamicVectaraToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.DynamicVectara!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.DynamicVectara!.Value, typeInfo); } else if (value.IsMcp) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineMcpToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineMcpToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineMcpToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Mcp!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Mcp!.Value, typeInfo); } else if (value.IsCorporaSearch) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineCorporaSearchToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineCorporaSearchToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineCorporaSearchToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.CorporaSearch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.CorporaSearch!.Value, typeInfo); } else if (value.IsWebSearch) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebSearchToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebSearchToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineWebSearchToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearch!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearch!.Value, typeInfo); } else if (value.IsWebGet) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebGetToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebGetToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineWebGetToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebGet!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebGet!.Value, typeInfo); } else if (value.IsLambda) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineLambdaToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineLambdaToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineLambdaToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Lambda!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Lambda!.Value, typeInfo); } else if (value.IsSubAgent) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineSubAgentToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineSubAgentToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineSubAgentToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.SubAgent!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.SubAgent!.Value, typeInfo); } else if (value.IsArtifactCreate) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactCreateToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactCreate!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactCreate!.Value, typeInfo); } else if (value.IsArtifactRead) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactReadToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactReadToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactReadToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactRead!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactRead!.Value, typeInfo); } else if (value.IsArtifactGrep) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactGrepToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactGrepToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactGrepToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactGrep!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactGrep!.Value, typeInfo); } else if (value.IsImageRead) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineImageReadToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineImageReadToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineImageReadToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageRead!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.ImageRead!.Value, typeInfo); } else if (value.IsDocumentConversion) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDocumentConversionToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDocumentConversionToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineDocumentConversionToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.DocumentConversion!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.DocumentConversion!.Value, typeInfo); } else if (value.IsGetDocumentText) { - var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineGetDocumentTextToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineGetDocumentTextToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineGetDocumentTextToolConfiguration).Name}"); - global::System.Text.Json.JsonSerializer.Serialize(writer, value.GetDocumentText!, typeInfo); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.GetDocumentText!.Value, typeInfo); } } } diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateOpenAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateOpenAILLMRequest.g.cs index 2ea78983..87797119 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateOpenAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateOpenAILLMRequest.g.cs @@ -44,6 +44,7 @@ public class CreateOpenAILLMRequestJsonConverter : global::System.Text.Json.Seri if (__jsonProps.Contains("capabilities.tool_calling")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("headers")) __score0++; + if (__jsonProps.Contains("idle_timeout_seconds")) __score0++; if (__jsonProps.Contains("model")) __score0++; if (__jsonProps.Contains("name")) __score0++; if (__jsonProps.Contains("test_model_parameters")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateOpenAIResponsesLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateOpenAIResponsesLLMRequest.g.cs index e20005bb..52db4d3a 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateOpenAIResponsesLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.CreateOpenAIResponsesLLMRequest.g.cs @@ -44,6 +44,7 @@ public class CreateOpenAIResponsesLLMRequestJsonConverter : global::System.Text. if (__jsonProps.Contains("capabilities.tool_calling")) __score0++; if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("headers")) __score0++; + if (__jsonProps.Contains("idle_timeout_seconds")) __score0++; if (__jsonProps.Contains("model")) __score0++; if (__jsonProps.Contains("name")) __score0++; if (__jsonProps.Contains("test_model_parameters")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactCreateToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactCreateToolConfiguration.g.cs new file mode 100644 index 00000000..40295d91 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactCreateToolConfiguration.g.cs @@ -0,0 +1,138 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineArtifactCreateToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineArtifactCreateToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineArtifactCreateToolConfigurationVariant2? inlineArtifactCreateToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2).Name}"); + inlineArtifactCreateToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineArtifactCreateToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2).Name}"); + inlineArtifactCreateToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineArtifactCreateToolConfiguration( + agentBase, + + inlineArtifactCreateToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineArtifactCreateToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineArtifactCreateToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineArtifactCreateToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactGrepToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactGrepToolConfiguration.g.cs new file mode 100644 index 00000000..ab78c538 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactGrepToolConfiguration.g.cs @@ -0,0 +1,149 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineArtifactGrepToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineArtifactGrepToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.artifact_id")) __score1++; + if (__jsonProps.Contains("argument_override.grep_options")) __score1++; + if (__jsonProps.Contains("argument_override.pattern")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineArtifactGrepToolConfigurationVariant2? inlineArtifactGrepToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2).Name}"); + inlineArtifactGrepToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineArtifactGrepToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2).Name}"); + inlineArtifactGrepToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineArtifactGrepToolConfiguration( + agentBase, + + inlineArtifactGrepToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineArtifactGrepToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineArtifactGrepToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineArtifactGrepToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactReadToolConfiguration.g.cs new file mode 100644 index 00000000..e899266b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineArtifactReadToolConfiguration.g.cs @@ -0,0 +1,153 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineArtifactReadToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineArtifactReadToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.artifact_id")) __score1++; + if (__jsonProps.Contains("argument_override.encoding")) __score1++; + if (__jsonProps.Contains("argument_override.end_line")) __score1++; + if (__jsonProps.Contains("argument_override.start_line")) __score1++; + if (__jsonProps.Contains("tool_configuration")) __score1++; + if (__jsonProps.Contains("tool_configuration.max_lines")) __score1++; + if (__jsonProps.Contains("tool_configuration.max_size_bytes")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineArtifactReadToolConfigurationVariant2? inlineArtifactReadToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2).Name}"); + inlineArtifactReadToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineArtifactReadToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2).Name}"); + inlineArtifactReadToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineArtifactReadToolConfiguration( + agentBase, + + inlineArtifactReadToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineArtifactReadToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineArtifactReadToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineArtifactReadToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineCorporaSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineCorporaSearchToolConfiguration.g.cs new file mode 100644 index 00000000..416ebfee --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineCorporaSearchToolConfiguration.g.cs @@ -0,0 +1,151 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineCorporaSearchToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineCorporaSearchToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.query")) __score1++; + if (__jsonProps.Contains("query_configuration")) __score1++; + if (__jsonProps.Contains("query_configuration.generation")) __score1++; + if (__jsonProps.Contains("query_configuration.save_history")) __score1++; + if (__jsonProps.Contains("query_configuration.search")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineCorporaSearchToolConfigurationVariant2? inlineCorporaSearchToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2).Name}"); + inlineCorporaSearchToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineCorporaSearchToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2).Name}"); + inlineCorporaSearchToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineCorporaSearchToolConfiguration( + agentBase, + + inlineCorporaSearchToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineCorporaSearchToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineCorporaSearchToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineCorporaSearchToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDocumentConversionToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDocumentConversionToolConfiguration.g.cs new file mode 100644 index 00000000..ef2adeaf --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDocumentConversionToolConfiguration.g.cs @@ -0,0 +1,149 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineDocumentConversionToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineDocumentConversionToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.artifact_id")) __score1++; + if (__jsonProps.Contains("argument_override.description")) __score1++; + if (__jsonProps.Contains("argument_override.output_format")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineDocumentConversionToolConfigurationVariant2? inlineDocumentConversionToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2).Name}"); + inlineDocumentConversionToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineDocumentConversionToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2).Name}"); + inlineDocumentConversionToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineDocumentConversionToolConfiguration( + agentBase, + + inlineDocumentConversionToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineDocumentConversionToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineDocumentConversionToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineDocumentConversionToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDynamicVectaraToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDynamicVectaraToolConfiguration.g.cs new file mode 100644 index 00000000..c0469bdc --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineDynamicVectaraToolConfiguration.g.cs @@ -0,0 +1,140 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineDynamicVectaraToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineDynamicVectaraToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("tool_id")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? inlineDynamicVectaraToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2).Name}"); + inlineDynamicVectaraToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineDynamicVectaraToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2).Name}"); + inlineDynamicVectaraToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineDynamicVectaraToolConfiguration( + agentBase, + + inlineDynamicVectaraToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineDynamicVectaraToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineDynamicVectaraToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineDynamicVectaraToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineGetDocumentTextToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineGetDocumentTextToolConfiguration.g.cs new file mode 100644 index 00000000..914bb4b7 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineGetDocumentTextToolConfiguration.g.cs @@ -0,0 +1,150 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineGetDocumentTextToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineGetDocumentTextToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.corpus_key")) __score1++; + if (__jsonProps.Contains("argument_override.document_id")) __score1++; + if (__jsonProps.Contains("tool_configuration")) __score1++; + if (__jsonProps.Contains("tool_configuration.metadata")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? inlineGetDocumentTextToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2).Name}"); + inlineGetDocumentTextToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineGetDocumentTextToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2).Name}"); + inlineGetDocumentTextToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineGetDocumentTextToolConfiguration( + agentBase, + + inlineGetDocumentTextToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineGetDocumentTextToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineGetDocumentTextToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineGetDocumentTextToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineImageReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineImageReadToolConfiguration.g.cs new file mode 100644 index 00000000..7becbfd8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineImageReadToolConfiguration.g.cs @@ -0,0 +1,148 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineImageReadToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineImageReadToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.artifact_id")) __score1++; + if (__jsonProps.Contains("argument_override.detail")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineImageReadToolConfigurationVariant2? inlineImageReadToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineImageReadToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineImageReadToolConfigurationVariant2).Name}"); + inlineImageReadToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineImageReadToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineImageReadToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineImageReadToolConfigurationVariant2).Name}"); + inlineImageReadToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineImageReadToolConfiguration( + agentBase, + + inlineImageReadToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineImageReadToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineImageReadToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineImageReadToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineImageReadToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineImageReadToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineLambdaToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineLambdaToolConfiguration.g.cs new file mode 100644 index 00000000..0109252c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineLambdaToolConfiguration.g.cs @@ -0,0 +1,140 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineLambdaToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineLambdaToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("tool_id")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineLambdaToolConfigurationVariant2? inlineLambdaToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineLambdaToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineLambdaToolConfigurationVariant2).Name}"); + inlineLambdaToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineLambdaToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineLambdaToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineLambdaToolConfigurationVariant2).Name}"); + inlineLambdaToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineLambdaToolConfiguration( + agentBase, + + inlineLambdaToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineLambdaToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineLambdaToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineLambdaToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineLambdaToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineLambdaToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineMcpToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineMcpToolConfiguration.g.cs new file mode 100644 index 00000000..522002ca --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineMcpToolConfiguration.g.cs @@ -0,0 +1,140 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineMcpToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineMcpToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("tool_id")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineMcpToolConfigurationVariant2? inlineMcpToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineMcpToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineMcpToolConfigurationVariant2).Name}"); + inlineMcpToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineMcpToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineMcpToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineMcpToolConfigurationVariant2).Name}"); + inlineMcpToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineMcpToolConfiguration( + agentBase, + + inlineMcpToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineMcpToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineMcpToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineMcpToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineMcpToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineMcpToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineSubAgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineSubAgentToolConfiguration.g.cs new file mode 100644 index 00000000..9f66339f --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineSubAgentToolConfiguration.g.cs @@ -0,0 +1,152 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineSubAgentToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineSubAgentToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.message")) __score1++; + if (__jsonProps.Contains("argument_override.session_tti_minutes")) __score1++; + if (__jsonProps.Contains("sub_agent_configuration")) __score1++; + if (__jsonProps.Contains("sub_agent_configuration.agent_key")) __score1++; + if (__jsonProps.Contains("sub_agent_configuration.session_metadata")) __score1++; + if (__jsonProps.Contains("sub_agent_configuration.session_mode")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? @base = default; + global::Vectara.InlineSubAgentToolConfigurationVariant2? inlineSubAgentToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2).Name}"); + inlineSubAgentToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (@base == null && inlineSubAgentToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + @base = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2).Name}"); + inlineSubAgentToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineSubAgentToolConfiguration( + @base, + + inlineSubAgentToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineSubAgentToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Base!, typeInfo); + } + else if (value.IsInlineSubAgentToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineSubAgentToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs new file mode 100644 index 00000000..b9f0248e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebGetToolConfiguration.g.cs @@ -0,0 +1,156 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineWebGetToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineWebGetToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.body")) __score1++; + if (__jsonProps.Contains("argument_override.follow_redirects")) __score1++; + if (__jsonProps.Contains("argument_override.head_lines")) __score1++; + if (__jsonProps.Contains("argument_override.headers")) __score1++; + if (__jsonProps.Contains("argument_override.max_content_bytes")) __score1++; + if (__jsonProps.Contains("argument_override.method")) __score1++; + if (__jsonProps.Contains("argument_override.ssl_verify")) __score1++; + if (__jsonProps.Contains("argument_override.tail_lines")) __score1++; + if (__jsonProps.Contains("argument_override.timeout_seconds")) __score1++; + if (__jsonProps.Contains("argument_override.url")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineWebGetToolConfigurationVariant2? inlineWebGetToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebGetToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineWebGetToolConfigurationVariant2).Name}"); + inlineWebGetToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineWebGetToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebGetToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineWebGetToolConfigurationVariant2).Name}"); + inlineWebGetToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineWebGetToolConfiguration( + agentBase, + + inlineWebGetToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineWebGetToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineWebGetToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebGetToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineWebGetToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineWebGetToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebSearchToolConfiguration.g.cs new file mode 100644 index 00000000..ac88bf10 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.InlineWebSearchToolConfiguration.g.cs @@ -0,0 +1,151 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace Vectara.JsonConverters +{ + /// + public class InlineWebSearchToolConfigurationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.InlineWebSearchToolConfiguration Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader); + var __rawJson = __jsonDocument.RootElement.GetRawText(); + var __jsonProps = new global::System.Collections.Generic.HashSet(); + if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name); + if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object) + { + foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject()) + { + __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name); + } + } + + } + } + + var __score0 = 0; + if (__jsonProps.Contains("description")) __score0++; + if (__jsonProps.Contains("description_template")) __score0++; + if (__jsonProps.Contains("output_transform")) __score0++; + var __score1 = 0; + if (__jsonProps.Contains("argument_override")) __score1++; + if (__jsonProps.Contains("argument_override.exclude_domains")) __score1++; + if (__jsonProps.Contains("argument_override.include_domains")) __score1++; + if (__jsonProps.Contains("argument_override.limit")) __score1++; + if (__jsonProps.Contains("argument_override.provider")) __score1++; + if (__jsonProps.Contains("argument_override.query")) __score1++; + if (__jsonProps.Contains("type")) __score1++; + var __bestScore = 0; + var __bestIndex = -1; + if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; } + if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; } + + global::Vectara.AgentToolConfigurationBase? agentBase = default; + global::Vectara.InlineWebSearchToolConfigurationVariant2? inlineWebSearchToolConfigurationVariant2 = default; + if (__bestIndex >= 0) + { + if (__bestIndex == 0) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + else if (__bestIndex == 1) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2).Name}"); + inlineWebSearchToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + } + + if (agentBase == null && inlineWebSearchToolConfigurationVariant2 == null) + { + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + agentBase = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + + try + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2).Name}"); + inlineWebSearchToolConfigurationVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo); + } + catch (global::System.Text.Json.JsonException) + { + } + catch (global::System.InvalidOperationException) + { + } + } + + var __value = new global::Vectara.InlineWebSearchToolConfiguration( + agentBase, + + inlineWebSearchToolConfigurationVariant2 + ); + + return __value; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.InlineWebSearchToolConfiguration value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsAgentBase) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.AgentToolConfigurationBase), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.AgentToolConfigurationBase).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentBase!, typeInfo); + } + else if (value.IsInlineWebSearchToolConfigurationVariant2) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.InlineWebSearchToolConfigurationVariant2!, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolOutputOffloadingConfigurationMode.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolOutputOffloadingConfigurationMode.g.cs new file mode 100644 index 00000000..7dbc57c1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolOutputOffloadingConfigurationMode.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class ToolOutputOffloadingConfigurationModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ToolOutputOffloadingConfigurationMode Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.ToolOutputOffloadingConfigurationModeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.ToolOutputOffloadingConfigurationMode)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.ToolOutputOffloadingConfigurationMode); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ToolOutputOffloadingConfigurationMode value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Vectara.ToolOutputOffloadingConfigurationModeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolOutputOffloadingConfigurationModeNullable.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolOutputOffloadingConfigurationModeNullable.g.cs new file mode 100644 index 00000000..ae418eb9 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.ToolOutputOffloadingConfigurationModeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Vectara.JsonConverters +{ + /// + public sealed class ToolOutputOffloadingConfigurationModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Vectara.ToolOutputOffloadingConfigurationMode? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::Vectara.ToolOutputOffloadingConfigurationModeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Vectara.ToolOutputOffloadingConfigurationMode)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Vectara.ToolOutputOffloadingConfigurationMode?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Vectara.ToolOutputOffloadingConfigurationMode? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::Vectara.ToolOutputOffloadingConfigurationModeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateOpenAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateOpenAILLMRequest.g.cs index dd30cb76..6743b6a7 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateOpenAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateOpenAILLMRequest.g.cs @@ -45,6 +45,7 @@ public class UpdateOpenAILLMRequestJsonConverter : global::System.Text.Json.Seri if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("enabled")) __score0++; if (__jsonProps.Contains("headers")) __score0++; + if (__jsonProps.Contains("idle_timeout_seconds")) __score0++; if (__jsonProps.Contains("model")) __score0++; if (__jsonProps.Contains("test_model_parameters")) __score0++; if (__jsonProps.Contains("uri")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateOpenAIResponsesLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateOpenAIResponsesLLMRequest.g.cs index d0e38f38..fc97490f 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateOpenAIResponsesLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonConverters.UpdateOpenAIResponsesLLMRequest.g.cs @@ -45,6 +45,7 @@ public class UpdateOpenAIResponsesLLMRequestJsonConverter : global::System.Text. if (__jsonProps.Contains("description")) __score0++; if (__jsonProps.Contains("enabled")) __score0++; if (__jsonProps.Contains("headers")) __score0++; + if (__jsonProps.Contains("idle_timeout_seconds")) __score0++; if (__jsonProps.Contains("model")) __score0++; if (__jsonProps.Contains("test_model_parameters")) __score0++; if (__jsonProps.Contains("uri")) __score0++; diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs index 6f78bd94..434053c7 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContext.g.cs @@ -269,6 +269,10 @@ namespace Vectara typeof(global::Vectara.JsonConverters.CompactionConfigToolEventPolicyNullableJsonConverter), + typeof(global::Vectara.JsonConverters.ToolOutputOffloadingConfigurationModeJsonConverter), + + typeof(global::Vectara.JsonConverters.ToolOutputOffloadingConfigurationModeNullableJsonConverter), + typeof(global::Vectara.JsonConverters.AgentInputDiscriminatorTypeJsonConverter), typeof(global::Vectara.JsonConverters.AgentInputDiscriminatorTypeNullableJsonConverter), @@ -523,6 +527,32 @@ namespace Vectara typeof(global::Vectara.JsonConverters.UpdateInstructionRequestJsonConverter), + typeof(global::Vectara.JsonConverters.InlineDynamicVectaraToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineMcpToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineCorporaSearchToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineWebSearchToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineWebGetToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineLambdaToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineSubAgentToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineArtifactCreateToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineArtifactReadToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineArtifactGrepToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineImageReadToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineDocumentConversionToolConfigurationJsonConverter), + + typeof(global::Vectara.JsonConverters.InlineGetDocumentTextToolConfigurationJsonConverter), + typeof(global::Vectara.JsonConverters.AgentToolConfigurationJsonConverter), typeof(global::Vectara.JsonConverters.ReferenceInstructionJsonConverter), @@ -1033,8 +1063,11 @@ namespace Vectara [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.UpdateInstructionRequestDiscriminatorType), TypeInfoPropertyName = "UpdateInstructionRequestDiscriminatorType2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.TestInstructionRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.TestInstructionResponse))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineDynamicVectaraToolConfiguration))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineMcpToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentToolConfigurationBase))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineDynamicVectaraToolConfiguration), TypeInfoPropertyName = "InlineDynamicVectaraToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineMcpToolConfiguration), TypeInfoPropertyName = "InlineMcpToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineMcpToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CorporaSearchToolParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.EagerReference))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentKeyedSearchCorpus))] @@ -1042,39 +1075,50 @@ namespace Vectara [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentSearchCorporaParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentCorporaSearchQueryConfiguration))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineCorporaSearchToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineCorporaSearchToolConfiguration), TypeInfoPropertyName = "InlineCorporaSearchToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebSearchToolParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebSearchToolParametersProvider), TypeInfoPropertyName = "WebSearchToolParametersProvider2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineWebSearchToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineWebSearchToolConfiguration), TypeInfoPropertyName = "InlineWebSearchToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetToolParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.WebGetToolParametersMethod), TypeInfoPropertyName = "WebGetToolParametersMethod2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf, global::Vectara.EagerReference>), TypeInfoPropertyName = "OneOfDictionaryStringStringEagerReference2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf), TypeInfoPropertyName = "OneOfBooleanEagerReference2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf), TypeInfoPropertyName = "OneOfInt32EagerReference2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.OneOf), TypeInfoPropertyName = "OneOfInt64EagerReference2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineWebGetToolConfiguration))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineLambdaToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineWebGetToolConfiguration), TypeInfoPropertyName = "InlineWebGetToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineWebGetToolConfigurationVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineLambdaToolConfiguration), TypeInfoPropertyName = "InlineLambdaToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineLambdaToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SubAgentToolParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SubAgentSessionMode), TypeInfoPropertyName = "SubAgentSessionMode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.SubAgentConfiguration))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineSubAgentToolConfiguration))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactCreateToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineSubAgentToolConfiguration), TypeInfoPropertyName = "InlineSubAgentToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactCreateToolConfiguration), TypeInfoPropertyName = "InlineArtifactCreateToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ArtifactReadToolParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ArtifactReadToolParametersEncoding), TypeInfoPropertyName = "ArtifactReadToolParametersEncoding2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ArtifactReadConfiguration))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactReadToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactReadToolConfiguration), TypeInfoPropertyName = "InlineArtifactReadToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ArtifactGrepToolParameters))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactGrepToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactGrepToolConfiguration), TypeInfoPropertyName = "InlineArtifactGrepToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ImageReadToolParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ImageReadToolParametersDetail), TypeInfoPropertyName = "ImageReadToolParametersDetail2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineImageReadToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineImageReadToolConfiguration), TypeInfoPropertyName = "InlineImageReadToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineImageReadToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.DocumentConversionToolParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.DocumentConversionToolParametersOutputFormat), TypeInfoPropertyName = "DocumentConversionToolParametersOutputFormat2")] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineDocumentConversionToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineDocumentConversionToolConfiguration), TypeInfoPropertyName = "InlineDocumentConversionToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GetDocumentTextParameters))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GetDocumentTextConfiguration))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GetDocumentTextConfigurationMetadata))] - [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineGetDocumentTextToolConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineGetDocumentTextToolConfiguration), TypeInfoPropertyName = "InlineGetDocumentTextToolConfiguration2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentToolConfiguration), TypeInfoPropertyName = "AgentToolConfiguration2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentToolConfigurationDiscriminator))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.AgentToolConfigurationDiscriminatorType), TypeInfoPropertyName = "AgentToolConfigurationDiscriminatorType2")] @@ -1110,7 +1154,9 @@ namespace Vectara [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CompactionConfig))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CompactionConfigToolEventPolicy), TypeInfoPropertyName = "CompactionConfigToolEventPolicy2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ToolOutputOffloadingConfiguration))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ToolOutputOffloadingConfigurationMode), TypeInfoPropertyName = "ToolOutputOffloadingConfigurationMode2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.Agent))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListAgentsResponse))] diff --git a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs index 23364c75..8d18547d 100644 --- a/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs +++ b/src/libs/Vectara/Generated/Vectara.JsonSerializerContextTypes.g.cs @@ -1584,1243 +1584,1307 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Vectara.InlineDynamicVectaraToolConfiguration? Type389 { get; set; } + public global::Vectara.AgentToolConfigurationBase? Type389 { get; set; } /// /// /// - public global::Vectara.InlineMcpToolConfiguration? Type390 { get; set; } + public global::Vectara.InlineDynamicVectaraToolConfiguration? Type390 { get; set; } /// /// /// - public global::Vectara.CorporaSearchToolParameters? Type391 { get; set; } + public global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? Type391 { get; set; } /// /// /// - public global::Vectara.EagerReference? Type392 { get; set; } + public global::Vectara.InlineMcpToolConfiguration? Type392 { get; set; } /// /// /// - public global::Vectara.AgentKeyedSearchCorpus? Type393 { get; set; } + public global::Vectara.InlineMcpToolConfigurationVariant2? Type393 { get; set; } /// /// /// - public global::Vectara.OneOf? Type394 { get; set; } + public global::Vectara.CorporaSearchToolParameters? Type394 { get; set; } /// /// /// - public global::Vectara.AgentSearchCorporaParameters? Type395 { get; set; } + public global::Vectara.EagerReference? Type395 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type396 { get; set; } + public global::Vectara.AgentKeyedSearchCorpus? Type396 { get; set; } /// /// /// - public global::Vectara.AgentCorporaSearchQueryConfiguration? Type397 { get; set; } + public global::Vectara.OneOf? Type397 { get; set; } /// /// /// - public global::Vectara.InlineCorporaSearchToolConfiguration? Type398 { get; set; } + public global::Vectara.AgentSearchCorporaParameters? Type398 { get; set; } /// /// /// - public global::Vectara.WebSearchToolParameters? Type399 { get; set; } + public global::System.Collections.Generic.IList? Type399 { get; set; } /// /// /// - public global::Vectara.WebSearchToolParametersProvider? Type400 { get; set; } + public global::Vectara.AgentCorporaSearchQueryConfiguration? Type400 { get; set; } /// /// /// - public global::Vectara.InlineWebSearchToolConfiguration? Type401 { get; set; } + public global::Vectara.InlineCorporaSearchToolConfiguration? Type401 { get; set; } /// /// /// - public global::Vectara.WebGetToolParameters? Type402 { get; set; } + public global::Vectara.InlineCorporaSearchToolConfigurationVariant2? Type402 { get; set; } /// /// /// - public global::Vectara.WebGetToolParametersMethod? Type403 { get; set; } + public global::Vectara.WebSearchToolParameters? Type403 { get; set; } /// /// /// - public global::Vectara.OneOf, global::Vectara.EagerReference>? Type404 { get; set; } + public global::Vectara.WebSearchToolParametersProvider? Type404 { get; set; } /// /// /// - public global::Vectara.OneOf? Type405 { get; set; } + public global::Vectara.InlineWebSearchToolConfiguration? Type405 { get; set; } /// /// /// - public global::Vectara.OneOf? Type406 { get; set; } + public global::Vectara.InlineWebSearchToolConfigurationVariant2? Type406 { get; set; } /// /// /// - public global::Vectara.OneOf? Type407 { get; set; } + public global::Vectara.WebGetToolParameters? Type407 { get; set; } /// /// /// - public global::Vectara.InlineWebGetToolConfiguration? Type408 { get; set; } + public global::Vectara.WebGetToolParametersMethod? Type408 { get; set; } /// /// /// - public global::Vectara.InlineLambdaToolConfiguration? Type409 { get; set; } + public global::Vectara.OneOf, global::Vectara.EagerReference>? Type409 { get; set; } /// /// /// - public global::Vectara.SubAgentToolParameters? Type410 { get; set; } + public global::Vectara.OneOf? Type410 { get; set; } /// /// /// - public global::Vectara.SubAgentSessionMode? Type411 { get; set; } + public global::Vectara.OneOf? Type411 { get; set; } /// /// /// - public global::Vectara.SubAgentConfiguration? Type412 { get; set; } + public global::Vectara.OneOf? Type412 { get; set; } /// /// /// - public global::Vectara.InlineSubAgentToolConfiguration? Type413 { get; set; } + public global::Vectara.InlineWebGetToolConfiguration? Type413 { get; set; } /// /// /// - public global::Vectara.InlineArtifactCreateToolConfiguration? Type414 { get; set; } + public global::Vectara.InlineWebGetToolConfigurationVariant2? Type414 { get; set; } /// /// /// - public global::Vectara.ArtifactReadToolParameters? Type415 { get; set; } + public global::Vectara.InlineLambdaToolConfiguration? Type415 { get; set; } /// /// /// - public global::Vectara.ArtifactReadToolParametersEncoding? Type416 { get; set; } + public global::Vectara.InlineLambdaToolConfigurationVariant2? Type416 { get; set; } /// /// /// - public global::Vectara.ArtifactReadConfiguration? Type417 { get; set; } + public global::Vectara.SubAgentToolParameters? Type417 { get; set; } /// /// /// - public global::Vectara.InlineArtifactReadToolConfiguration? Type418 { get; set; } + public global::Vectara.SubAgentSessionMode? Type418 { get; set; } /// /// /// - public global::Vectara.ArtifactGrepToolParameters? Type419 { get; set; } + public global::Vectara.SubAgentConfiguration? Type419 { get; set; } /// /// /// - public global::Vectara.InlineArtifactGrepToolConfiguration? Type420 { get; set; } + public global::Vectara.InlineSubAgentToolConfiguration? Type420 { get; set; } /// /// /// - public global::Vectara.ImageReadToolParameters? Type421 { get; set; } + public global::Vectara.InlineSubAgentToolConfigurationVariant2? Type421 { get; set; } /// /// /// - public global::Vectara.ImageReadToolParametersDetail? Type422 { get; set; } + public global::Vectara.InlineArtifactCreateToolConfiguration? Type422 { get; set; } /// /// /// - public global::Vectara.InlineImageReadToolConfiguration? Type423 { get; set; } + public global::Vectara.InlineArtifactCreateToolConfigurationVariant2? Type423 { get; set; } /// /// /// - public global::Vectara.DocumentConversionToolParameters? Type424 { get; set; } + public global::Vectara.ArtifactReadToolParameters? Type424 { get; set; } /// /// /// - public global::Vectara.DocumentConversionToolParametersOutputFormat? Type425 { get; set; } + public global::Vectara.ArtifactReadToolParametersEncoding? Type425 { get; set; } /// /// /// - public global::Vectara.InlineDocumentConversionToolConfiguration? Type426 { get; set; } + public global::Vectara.ArtifactReadConfiguration? Type426 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextParameters? Type427 { get; set; } + public global::Vectara.InlineArtifactReadToolConfiguration? Type427 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextConfiguration? Type428 { get; set; } + public global::Vectara.InlineArtifactReadToolConfigurationVariant2? Type428 { get; set; } /// /// /// - public global::Vectara.GetDocumentTextConfigurationMetadata? Type429 { get; set; } + public global::Vectara.ArtifactGrepToolParameters? Type429 { get; set; } /// /// /// - public global::Vectara.InlineGetDocumentTextToolConfiguration? Type430 { get; set; } + public global::Vectara.InlineArtifactGrepToolConfiguration? Type430 { get; set; } /// /// /// - public global::Vectara.AgentToolConfiguration? Type431 { get; set; } + public global::Vectara.InlineArtifactGrepToolConfigurationVariant2? Type431 { get; set; } /// /// /// - public global::Vectara.AgentToolConfigurationDiscriminator? Type432 { get; set; } + public global::Vectara.ImageReadToolParameters? Type432 { get; set; } /// /// /// - public global::Vectara.AgentToolConfigurationDiscriminatorType? Type433 { get; set; } + public global::Vectara.ImageReadToolParametersDetail? Type433 { get; set; } /// /// /// - public global::Vectara.AgentSkill? Type434 { get; set; } + public global::Vectara.InlineImageReadToolConfiguration? Type434 { get; set; } /// /// /// - public global::Vectara.RetryConfiguration? Type435 { get; set; } + public global::Vectara.InlineImageReadToolConfigurationVariant2? Type435 { get; set; } /// /// /// - public global::Vectara.AgentModel? Type436 { get; set; } + public global::Vectara.DocumentConversionToolParameters? Type436 { get; set; } /// /// /// - public global::Vectara.InstructionReference? Type437 { get; set; } + public global::Vectara.DocumentConversionToolParametersOutputFormat? Type437 { get; set; } /// /// /// - public global::Vectara.ReferenceInstruction? Type438 { get; set; } + public global::Vectara.InlineDocumentConversionToolConfiguration? Type438 { get; set; } /// /// /// - public global::Vectara.ReferenceInstructionVariant2? Type439 { get; set; } + public global::Vectara.InlineDocumentConversionToolConfigurationVariant2? Type439 { get; set; } /// /// /// - public global::Vectara.InlineInstruction? Type440 { get; set; } + public global::Vectara.GetDocumentTextParameters? Type440 { get; set; } /// /// /// - public global::Vectara.InlineInstructionVariant2? Type441 { get; set; } + public global::Vectara.GetDocumentTextConfiguration? Type441 { get; set; } /// /// /// - public global::Vectara.AgentStepInstruction? Type442 { get; set; } + public global::Vectara.GetDocumentTextConfigurationMetadata? Type442 { get; set; } /// /// /// - public global::Vectara.AgentStepInstructionDiscriminator? Type443 { get; set; } + public global::Vectara.InlineGetDocumentTextToolConfiguration? Type443 { get; set; } /// /// /// - public global::Vectara.AgentStepInstructionDiscriminatorType? Type444 { get; set; } + public global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? Type444 { get; set; } /// /// /// - public global::Vectara.DefaultOutputParser? Type445 { get; set; } + public global::Vectara.AgentToolConfiguration? Type445 { get; set; } /// /// /// - public global::Vectara.StructuredOutputParser? Type446 { get; set; } + public global::Vectara.AgentToolConfigurationDiscriminator? Type446 { get; set; } /// /// /// - public global::Vectara.AgentOutputParser? Type447 { get; set; } + public global::Vectara.AgentToolConfigurationDiscriminatorType? Type447 { get; set; } /// /// /// - public global::Vectara.AgentOutputParserDiscriminator? Type448 { get; set; } + public global::Vectara.AgentSkill? Type448 { get; set; } /// /// /// - public global::Vectara.AgentOutputParserDiscriminatorType? Type449 { get; set; } + public global::Vectara.RetryConfiguration? Type449 { get; set; } /// /// /// - public global::Vectara.TemplatedReminder? Type450 { get; set; } + public global::Vectara.AgentModel? Type450 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type451 { get; set; } + public global::Vectara.InstructionReference? Type451 { get; set; } /// /// /// - public global::Vectara.TemplatedReminderHook? Type452 { get; set; } + public global::Vectara.ReferenceInstruction? Type452 { get; set; } /// /// /// - public global::Vectara.GlossaryExpansionReminder? Type453 { get; set; } + public global::Vectara.ReferenceInstructionVariant2? Type453 { get; set; } /// /// /// - public global::Vectara.AgentStepReminder? Type454 { get; set; } + public global::Vectara.InlineInstruction? Type454 { get; set; } /// /// /// - public global::Vectara.AgentStepReminderDiscriminator? Type455 { get; set; } + public global::Vectara.InlineInstructionVariant2? Type455 { get; set; } /// /// /// - public global::Vectara.AgentStepReminderDiscriminatorType? Type456 { get; set; } + public global::Vectara.AgentStepInstruction? Type456 { get; set; } /// /// /// - public global::Vectara.NextStep? Type457 { get; set; } + public global::Vectara.AgentStepInstructionDiscriminator? Type457 { get; set; } /// /// /// - public global::Vectara.FirstAgentStep? Type458 { get; set; } + public global::Vectara.AgentStepInstructionDiscriminatorType? Type458 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type459 { get; set; } + public global::Vectara.DefaultOutputParser? Type459 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type460 { get; set; } + public global::Vectara.StructuredOutputParser? Type460 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type461 { get; set; } + public global::Vectara.AgentOutputParser? Type461 { get; set; } /// /// /// - public global::Vectara.AgentStep? Type462 { get; set; } + public global::Vectara.AgentOutputParserDiscriminator? Type462 { get; set; } /// /// /// - public global::Vectara.CompactionConfig? Type463 { get; set; } + public global::Vectara.AgentOutputParserDiscriminatorType? Type463 { get; set; } /// /// /// - public global::Vectara.CompactionConfigToolEventPolicy? Type464 { get; set; } + public global::Vectara.TemplatedReminder? Type464 { get; set; } /// /// /// - public global::Vectara.ToolOutputOffloadingConfiguration? Type465 { get; set; } + public global::System.Collections.Generic.IList? Type465 { get; set; } /// /// /// - public global::Vectara.Agent? Type466 { get; set; } + public global::Vectara.TemplatedReminderHook? Type466 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type467 { get; set; } + public global::Vectara.GlossaryExpansionReminder? Type467 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type468 { get; set; } + public global::Vectara.AgentStepReminder? Type468 { get; set; } /// /// /// - public global::Vectara.ListAgentsResponse? Type469 { get; set; } + public global::Vectara.AgentStepReminderDiscriminator? Type469 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type470 { get; set; } + public global::Vectara.AgentStepReminderDiscriminatorType? Type470 { get; set; } /// /// /// - public global::Vectara.CreateAgentRequest? Type471 { get; set; } + public global::Vectara.NextStep? Type471 { get; set; } /// /// /// - public global::Vectara.UpdateFirstAgentStep? Type472 { get; set; } + public global::Vectara.FirstAgentStep? Type472 { get; set; } /// /// /// - public global::Vectara.UpdateAgentStep? Type473 { get; set; } + public global::System.Collections.Generic.IList? Type473 { get; set; } /// /// /// - public global::Vectara.UpdateAgentRequest? Type474 { get; set; } + public global::System.Collections.Generic.IList? Type474 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type475 { get; set; } + public global::System.Collections.Generic.IList? Type475 { get; set; } /// /// /// - public global::Vectara.InputTokens? Type476 { get; set; } + public global::Vectara.AgentStep? Type476 { get; set; } /// /// /// - public global::Vectara.OutputTokens? Type477 { get; set; } + public global::Vectara.CompactionConfig? Type477 { get; set; } /// /// /// - public global::Vectara.SessionContextUsage? Type478 { get; set; } + public global::Vectara.CompactionConfigToolEventPolicy? Type478 { get; set; } /// /// /// - public global::Vectara.AgentSession? Type479 { get; set; } + public global::Vectara.ToolOutputOffloadingConfiguration? Type479 { get; set; } /// /// /// - public global::Vectara.ListAgentSessionsResponse? Type480 { get; set; } + public global::Vectara.ToolOutputOffloadingConfigurationMode? Type480 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type481 { get; set; } + public global::Vectara.Agent? Type481 { get; set; } /// /// /// - public global::Vectara.CreateAgentSessionRequest? Type482 { get; set; } + public global::System.Collections.Generic.Dictionary? Type482 { get; set; } /// /// /// - public global::Vectara.CreateAgentSessionRequestFromSession? Type483 { get; set; } + public global::System.Collections.Generic.Dictionary? Type483 { get; set; } /// /// /// - public global::Vectara.UpdateAgentSessionRequest? Type484 { get; set; } + public global::System.Collections.Generic.Dictionary? Type484 { get; set; } /// /// /// - public global::Vectara.AgentEventBase? Type485 { get; set; } + public global::Vectara.ListAgentsResponse? Type485 { get; set; } /// /// /// - public global::Vectara.AgentTextInput? Type486 { get; set; } + public global::System.Collections.Generic.IList? Type486 { get; set; } /// /// /// - public global::Vectara.AgentSkillInput? Type487 { get; set; } + public global::Vectara.CreateAgentRequest? Type487 { get; set; } /// /// /// - public global::Vectara.AgentInput? Type488 { get; set; } + public global::Vectara.UpdateFirstAgentStep? Type488 { get; set; } /// /// /// - public global::Vectara.AgentInputDiscriminator? Type489 { get; set; } + public global::Vectara.UpdateAgentStep? Type489 { get; set; } /// /// /// - public global::Vectara.AgentInputDiscriminatorType? Type490 { get; set; } + public global::Vectara.UpdateAgentRequest? Type490 { get; set; } /// /// /// - public global::Vectara.InputMessageEvent? Type491 { get; set; } + public global::System.Collections.Generic.Dictionary? Type491 { get; set; } /// /// /// - public global::Vectara.InputMessageEventVariant2? Type492 { get; set; } + public global::Vectara.InputTokens? Type492 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type493 { get; set; } + public global::Vectara.OutputTokens? Type493 { get; set; } /// /// /// - public global::Vectara.SkillLoadEvent? Type494 { get; set; } + public global::Vectara.SessionContextUsage? Type494 { get; set; } /// /// /// - public global::Vectara.SkillLoadEventVariant2? Type495 { get; set; } + public global::Vectara.AgentSession? Type495 { get; set; } /// /// /// - public global::Vectara.ArtifactReference? Type496 { get; set; } + public global::Vectara.ListAgentSessionsResponse? Type496 { get; set; } /// /// /// - public global::Vectara.ArtifactUploadEvent? Type497 { get; set; } + public global::System.Collections.Generic.IList? Type497 { get; set; } /// /// /// - public global::Vectara.ArtifactUploadEventVariant2? Type498 { get; set; } + public global::Vectara.CreateAgentSessionRequest? Type498 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type499 { get; set; } + public global::Vectara.CreateAgentSessionRequestFromSession? Type499 { get; set; } /// /// /// - public global::Vectara.ToolInputEvent? Type500 { get; set; } + public global::Vectara.UpdateAgentSessionRequest? Type500 { get; set; } /// /// /// - public global::Vectara.ToolInputEventVariant2? Type501 { get; set; } + public global::Vectara.AgentEventBase? Type501 { get; set; } /// /// /// - public global::Vectara.ToolOutputEvent? Type502 { get; set; } + public global::Vectara.AgentTextInput? Type502 { get; set; } /// /// /// - public global::Vectara.ToolOutputEventVariant2? Type503 { get; set; } + public global::Vectara.AgentSkillInput? Type503 { get; set; } /// /// /// - public global::Vectara.ThinkingEvent? Type504 { get; set; } + public global::Vectara.AgentInput? Type504 { get; set; } /// /// /// - public global::Vectara.ThinkingEventVariant2? Type505 { get; set; } + public global::Vectara.AgentInputDiscriminator? Type505 { get; set; } /// /// /// - public global::Vectara.AgentOutputEvent? Type506 { get; set; } + public global::Vectara.AgentInputDiscriminatorType? Type506 { get; set; } /// /// /// - public global::Vectara.AgentOutputEventVariant2? Type507 { get; set; } + public global::Vectara.InputMessageEvent? Type507 { get; set; } /// /// /// - public global::Vectara.StructuredOutputEvent? Type508 { get; set; } + public global::Vectara.InputMessageEventVariant2? Type508 { get; set; } /// /// /// - public global::Vectara.StructuredOutputEventVariant2? Type509 { get; set; } + public global::System.Collections.Generic.IList? Type509 { get; set; } /// /// /// - public global::Vectara.ContextLimitExceededEvent? Type510 { get; set; } + public global::Vectara.SkillLoadEvent? Type510 { get; set; } /// /// /// - public global::Vectara.ContextLimitExceededEventVariant2? Type511 { get; set; } + public global::Vectara.SkillLoadEventVariant2? Type511 { get; set; } /// /// /// - public global::Vectara.StepTransitionLimitExceededEvent? Type512 { get; set; } + public global::Vectara.ArtifactReference? Type512 { get; set; } /// /// /// - public global::Vectara.StepTransitionLimitExceededEventVariant2? Type513 { get; set; } + public global::Vectara.ArtifactUploadEvent? Type513 { get; set; } /// /// /// - public global::Vectara.SessionInterruptedEvent? Type514 { get; set; } + public global::Vectara.ArtifactUploadEventVariant2? Type514 { get; set; } /// /// /// - public global::Vectara.SessionInterruptedEventVariant2? Type515 { get; set; } + public global::System.Collections.Generic.IList? Type515 { get; set; } /// /// /// - public global::Vectara.ImageReadEvent? Type516 { get; set; } + public global::Vectara.ToolInputEvent? Type516 { get; set; } /// /// /// - public global::Vectara.ImageReadEventVariant2? Type517 { get; set; } + public global::Vectara.ToolInputEventVariant2? Type517 { get; set; } /// /// /// - public global::Vectara.ImageReadEventVariant2Detail? Type518 { get; set; } + public global::Vectara.ToolOutputEvent? Type518 { get; set; } /// /// /// - public global::Vectara.StepTransitionEvent? Type519 { get; set; } + public global::Vectara.ToolOutputEventVariant2? Type519 { get; set; } /// /// /// - public global::Vectara.StepTransitionEventVariant2? Type520 { get; set; } + public global::Vectara.ThinkingEvent? Type520 { get; set; } /// /// /// - public global::Vectara.CompactionEvent? Type521 { get; set; } + public global::Vectara.ThinkingEventVariant2? Type521 { get; set; } /// /// /// - public global::Vectara.CompactionEventVariant2? Type522 { get; set; } + public global::Vectara.AgentOutputEvent? Type522 { get; set; } /// /// /// - public global::Vectara.AgentEvent? Type523 { get; set; } + public global::Vectara.AgentOutputEventVariant2? Type523 { get; set; } /// /// /// - public global::Vectara.AgentEventDiscriminator? Type524 { get; set; } + public global::Vectara.StructuredOutputEvent? Type524 { get; set; } /// /// /// - public global::Vectara.AgentEventDiscriminatorType? Type525 { get; set; } + public global::Vectara.StructuredOutputEventVariant2? Type525 { get; set; } /// /// /// - public global::Vectara.ListAgentEventsResponse? Type526 { get; set; } + public global::Vectara.ContextLimitExceededEvent? Type526 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type527 { get; set; } + public global::Vectara.ContextLimitExceededEventVariant2? Type527 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestBase? Type528 { get; set; } + public global::Vectara.StepTransitionLimitExceededEvent? Type528 { get; set; } /// /// /// - public global::Vectara.InputBehavior? Type529 { get; set; } + public global::Vectara.StepTransitionLimitExceededEventVariant2? Type529 { get; set; } /// /// /// - public global::Vectara.CreateInputMessageRequest? Type530 { get; set; } + public global::Vectara.SessionInterruptedEvent? Type530 { get; set; } /// /// /// - public global::Vectara.CreateInputMessageRequestVariant2? Type531 { get; set; } + public global::Vectara.SessionInterruptedEventVariant2? Type531 { get; set; } /// /// /// - public global::Vectara.CreateInterruptRequest? Type532 { get; set; } + public global::Vectara.ImageReadEvent? Type532 { get; set; } /// /// /// - public global::Vectara.CreateInterruptRequestVariant2? Type533 { get; set; } + public global::Vectara.ImageReadEventVariant2? Type533 { get; set; } /// /// /// - public global::Vectara.CreateCompactRequest? Type534 { get; set; } + public global::Vectara.ImageReadEventVariant2Detail? Type534 { get; set; } /// /// /// - public global::Vectara.CreateCompactRequestVariant2? Type535 { get; set; } + public global::Vectara.StepTransitionEvent? Type535 { get; set; } /// /// /// - public global::Vectara.CreateInputRequest? Type536 { get; set; } + public global::Vectara.StepTransitionEventVariant2? Type536 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestDiscriminator? Type537 { get; set; } + public global::Vectara.CompactionEvent? Type537 { get; set; } /// /// /// - public global::Vectara.CreateInputRequestDiscriminatorType? Type538 { get; set; } + public global::Vectara.CompactionEventVariant2? Type538 { get; set; } /// /// /// - public global::Vectara.AgentResponse? Type539 { get; set; } + public global::Vectara.AgentEvent? Type539 { get; set; } /// /// /// - public global::Vectara.StreamingAgentOutput? Type540 { get; set; } + public global::Vectara.AgentEventDiscriminator? Type540 { get; set; } /// /// /// - public global::Vectara.StreamingAgentOutputEnd? Type541 { get; set; } + public global::Vectara.AgentEventDiscriminatorType? Type541 { get; set; } /// /// /// - public global::Vectara.StreamingThinking? Type542 { get; set; } + public global::Vectara.ListAgentEventsResponse? Type542 { get; set; } /// /// /// - public global::Vectara.StreamingThinkingEnd? Type543 { get; set; } + public global::System.Collections.Generic.IList? Type543 { get; set; } /// /// /// - public global::Vectara.ContextConsumedEvent? Type544 { get; set; } + public global::Vectara.CreateInputRequestBase? Type544 { get; set; } /// /// /// - public global::Vectara.CompactionStartedEvent? Type545 { get; set; } + public global::Vectara.InputBehavior? Type545 { get; set; } /// /// /// - public global::Vectara.CompactionStartedEventVariant2? Type546 { get; set; } + public global::Vectara.CreateInputMessageRequest? Type546 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponse? Type547 { get; set; } + public global::Vectara.CreateInputMessageRequestVariant2? Type547 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponseDiscriminator? Type548 { get; set; } + public global::Vectara.CreateInterruptRequest? Type548 { get; set; } /// /// /// - public global::Vectara.AgentStreamedResponseDiscriminatorType? Type549 { get; set; } + public global::Vectara.CreateInterruptRequestVariant2? Type549 { get; set; } /// /// /// - public global::Vectara.SessionArtifact? Type550 { get; set; } + public global::Vectara.CreateCompactRequest? Type550 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsResponse? Type551 { get; set; } + public global::Vectara.CreateCompactRequestVariant2? Type551 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type552 { get; set; } + public global::Vectara.CreateInputRequest? Type552 { get; set; } /// /// /// - public global::Vectara.IntervalScheduleConfiguration? Type553 { get; set; } + public global::Vectara.CreateInputRequestDiscriminator? Type553 { get; set; } /// /// /// - public global::Vectara.IntervalScheduleConfigurationType? Type554 { get; set; } + public global::Vectara.CreateInputRequestDiscriminatorType? Type554 { get; set; } /// /// /// - public global::Vectara.CronScheduleConfiguration? Type555 { get; set; } + public global::Vectara.AgentResponse? Type555 { get; set; } /// /// /// - public global::Vectara.CronScheduleConfigurationType? Type556 { get; set; } + public global::Vectara.StreamingAgentOutput? Type556 { get; set; } /// /// /// - public global::Vectara.ScheduleConfiguration? Type557 { get; set; } + public global::Vectara.StreamingAgentOutputEnd? Type557 { get; set; } /// /// /// - public global::Vectara.AgentSchedule? Type558 { get; set; } + public global::Vectara.StreamingThinking? Type558 { get; set; } /// /// /// - public global::Vectara.ListAgentSchedulesResponse? Type559 { get; set; } + public global::Vectara.StreamingThinkingEnd? Type559 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type560 { get; set; } + public global::Vectara.ContextConsumedEvent? Type560 { get; set; } /// /// /// - public global::Vectara.CreateAgentScheduleRequest? Type561 { get; set; } + public global::Vectara.CompactionStartedEvent? Type561 { get; set; } /// /// /// - public global::Vectara.UpdateAgentScheduleRequest? Type562 { get; set; } + public global::Vectara.CompactionStartedEventVariant2? Type562 { get; set; } /// /// /// - public global::Vectara.AgentScheduleExecution? Type563 { get; set; } + public global::Vectara.AgentStreamedResponse? Type563 { get; set; } /// /// /// - public global::Vectara.AgentScheduleExecutionStatus? Type564 { get; set; } + public global::Vectara.AgentStreamedResponseDiscriminator? Type564 { get; set; } /// /// /// - public global::Vectara.ListAgentScheduleExecutionsResponse? Type565 { get; set; } + public global::Vectara.AgentStreamedResponseDiscriminatorType? Type565 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type566 { get; set; } + public global::Vectara.SessionArtifact? Type566 { get; set; } /// /// /// - public global::Vectara.AgentIdentityMode? Type567 { get; set; } + public global::Vectara.ListSessionArtifactsResponse? Type567 { get; set; } /// /// /// - public global::Vectara.AgentIdentity? Type568 { get; set; } + public global::System.Collections.Generic.IList? Type568 { get; set; } /// /// /// - public global::Vectara.UpdateAgentIdentityRequest? Type569 { get; set; } + public global::Vectara.IntervalScheduleConfiguration? Type569 { get; set; } /// /// /// - public global::Vectara.SlackConnectorConfiguration? Type570 { get; set; } + public global::Vectara.IntervalScheduleConfigurationType? Type570 { get; set; } /// /// /// - public global::Vectara.ConnectorConfiguration? Type571 { get; set; } + public global::Vectara.CronScheduleConfiguration? Type571 { get; set; } /// /// /// - public global::Vectara.ConnectorConfigurationDiscriminator? Type572 { get; set; } + public global::Vectara.CronScheduleConfigurationType? Type572 { get; set; } /// /// /// - public global::Vectara.ConnectorConfigurationDiscriminatorType? Type573 { get; set; } + public global::Vectara.ScheduleConfiguration? Type573 { get; set; } /// /// /// - public global::Vectara.AgentConnector? Type574 { get; set; } + public global::Vectara.AgentSchedule? Type574 { get; set; } /// /// /// - public global::Vectara.AgentConnectorType? Type575 { get; set; } + public global::Vectara.ListAgentSchedulesResponse? Type575 { get; set; } /// /// /// - public global::Vectara.AgentConnectorStatus? Type576 { get; set; } + public global::System.Collections.Generic.IList? Type576 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsResponse? Type577 { get; set; } + public global::Vectara.CreateAgentScheduleRequest? Type577 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type578 { get; set; } + public global::Vectara.UpdateAgentScheduleRequest? Type578 { get; set; } /// /// /// - public global::Vectara.CreateAgentConnectorRequest? Type579 { get; set; } + public global::Vectara.AgentScheduleExecution? Type579 { get; set; } /// /// /// - public global::Vectara.CreateAgentConnectorRequestType? Type580 { get; set; } + public global::Vectara.AgentScheduleExecutionStatus? Type580 { get; set; } /// /// /// - public global::Vectara.UpdateAgentConnectorRequest? Type581 { get; set; } + public global::Vectara.ListAgentScheduleExecutionsResponse? Type581 { get; set; } /// /// /// - public global::Vectara.PipelineStatus? Type582 { get; set; } + public global::System.Collections.Generic.IList? Type582 { get; set; } /// /// /// - public global::Vectara.BaseS3SourceConfiguration? Type583 { get; set; } + public global::Vectara.AgentIdentityMode? Type583 { get; set; } /// /// /// - public global::Vectara.S3SourceConfiguration? Type584 { get; set; } + public global::Vectara.AgentIdentity? Type584 { get; set; } /// /// /// - public global::Vectara.PipelineSource? Type585 { get; set; } + public global::Vectara.UpdateAgentIdentityRequest? Type585 { get; set; } /// /// /// - public global::Vectara.PipelineSourceDiscriminator? Type586 { get; set; } + public global::Vectara.SlackConnectorConfiguration? Type586 { get; set; } /// /// /// - public global::Vectara.PipelineSourceDiscriminatorType? Type587 { get; set; } + public global::Vectara.ConnectorConfiguration? Type587 { get; set; } /// /// /// - public global::Vectara.CronTriggerConfiguration? Type588 { get; set; } + public global::Vectara.ConnectorConfigurationDiscriminator? Type588 { get; set; } /// /// /// - public global::Vectara.IntervalTriggerConfiguration? Type589 { get; set; } + public global::Vectara.ConnectorConfigurationDiscriminatorType? Type589 { get; set; } /// /// /// - public global::Vectara.ManualTriggerConfiguration? Type590 { get; set; } + public global::Vectara.AgentConnector? Type590 { get; set; } /// /// /// - public global::Vectara.PipelineTrigger? Type591 { get; set; } + public global::Vectara.AgentConnectorType? Type591 { get; set; } /// /// /// - public global::Vectara.PipelineTriggerDiscriminator? Type592 { get; set; } + public global::Vectara.AgentConnectorStatus? Type592 { get; set; } /// /// /// - public global::Vectara.PipelineTriggerDiscriminatorType? Type593 { get; set; } + public global::Vectara.ListAgentConnectorsResponse? Type593 { get; set; } /// /// /// - public global::Vectara.ConditionVerification? Type594 { get; set; } + public global::System.Collections.Generic.IList? Type594 { get; set; } /// /// /// - public global::Vectara.AgentVerification? Type595 { get; set; } + public global::Vectara.CreateAgentConnectorRequest? Type595 { get; set; } /// /// /// - public global::Vectara.PipelineVerification? Type596 { get; set; } + public global::Vectara.CreateAgentConnectorRequestType? Type596 { get; set; } /// /// /// - public global::Vectara.PipelineVerificationDiscriminator? Type597 { get; set; } + public global::Vectara.UpdateAgentConnectorRequest? Type597 { get; set; } /// /// /// - public global::Vectara.PipelineVerificationDiscriminatorType? Type598 { get; set; } + public global::Vectara.PipelineStatus? Type598 { get; set; } /// /// /// - public global::Vectara.AgentTransformConfiguration? Type599 { get; set; } + public global::Vectara.BaseS3SourceConfiguration? Type599 { get; set; } /// /// /// - public global::Vectara.PipelineTransform? Type600 { get; set; } + public global::Vectara.S3SourceConfiguration? Type600 { get; set; } /// /// /// - public global::Vectara.PipelineTransformDiscriminator? Type601 { get; set; } + public global::Vectara.PipelineSource? Type601 { get; set; } /// /// /// - public global::Vectara.PipelineTransformDiscriminatorType? Type602 { get; set; } + public global::Vectara.PipelineSourceDiscriminator? Type602 { get; set; } /// /// /// - public global::Vectara.PipelineSyncMode? Type603 { get; set; } + public global::Vectara.PipelineSourceDiscriminatorType? Type603 { get; set; } /// /// /// - public global::Vectara.PipelineWatermark? Type604 { get; set; } + public global::Vectara.CronTriggerConfiguration? Type604 { get; set; } /// /// /// - public global::Vectara.Pipeline? Type605 { get; set; } + public global::Vectara.IntervalTriggerConfiguration? Type605 { get; set; } /// /// /// - public global::Vectara.ListPipelinesResponse? Type606 { get; set; } + public global::Vectara.ManualTriggerConfiguration? Type606 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type607 { get; set; } + public global::Vectara.PipelineTrigger? Type607 { get; set; } /// /// /// - public global::Vectara.CreatePipelineRequest? Type608 { get; set; } + public global::Vectara.PipelineTriggerDiscriminator? Type608 { get; set; } /// /// /// - public global::Vectara.UpdateS3SourceConfiguration? Type609 { get; set; } + public global::Vectara.PipelineTriggerDiscriminatorType? Type609 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSource? Type610 { get; set; } + public global::Vectara.ConditionVerification? Type610 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSourceDiscriminator? Type611 { get; set; } + public global::Vectara.AgentVerification? Type611 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type612 { get; set; } + public global::Vectara.PipelineVerification? Type612 { get; set; } /// /// /// - public global::Vectara.UpdatePipelineRequest? Type613 { get; set; } + public global::Vectara.PipelineVerificationDiscriminator? Type613 { get; set; } /// /// /// - public global::Vectara.PipelineRunStatus? Type614 { get; set; } + public global::Vectara.PipelineVerificationDiscriminatorType? Type614 { get; set; } /// /// /// - public global::Vectara.PipelineRunTriggerType? Type615 { get; set; } + public global::Vectara.AgentTransformConfiguration? Type615 { get; set; } /// /// /// - public global::Vectara.PipelineRun? Type616 { get; set; } + public global::Vectara.PipelineTransform? Type616 { get; set; } /// /// /// - public global::Vectara.DeadLetterStatus? Type617 { get; set; } + public global::Vectara.PipelineTransformDiscriminator? Type617 { get; set; } /// /// /// - public global::Vectara.DeadLetterOrigin? Type618 { get; set; } + public global::Vectara.PipelineTransformDiscriminatorType? Type618 { get; set; } /// /// /// - public global::Vectara.PipelineDeadLetterEntry? Type619 { get; set; } + public global::Vectara.PipelineSyncMode? Type619 { get; set; } /// /// /// - public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type620 { get; set; } + public global::Vectara.PipelineWatermark? Type620 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type621 { get; set; } + public global::Vectara.Pipeline? Type621 { get; set; } /// /// /// - public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type622 { get; set; } + public global::Vectara.ListPipelinesResponse? Type622 { get; set; } /// /// /// - public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type623 { get; set; } + public global::System.Collections.Generic.IList? Type623 { get; set; } /// /// /// - public global::Vectara.ListPipelineRunsResponse? Type624 { get; set; } + public global::Vectara.CreatePipelineRequest? Type624 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type625 { get; set; } + public global::Vectara.UpdateS3SourceConfiguration? Type625 { get; set; } /// /// /// - public global::Vectara.AgentTrace? Type626 { get; set; } + public global::Vectara.UpdatePipelineSource? Type626 { get; set; } /// /// /// - public global::Vectara.AgentTraceStatus? Type627 { get; set; } + public global::Vectara.UpdatePipelineSourceDiscriminator? Type627 { get; set; } /// /// /// - public global::Vectara.ListAgentTracesResponse? Type628 { get; set; } + public global::Vectara.UpdatePipelineSourceDiscriminatorType? Type628 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type629 { get; set; } + public global::Vectara.UpdatePipelineRequest? Type629 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanStatus? Type630 { get; set; } + public global::Vectara.PipelineRunStatus? Type630 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanBase? Type631 { get; set; } + public global::Vectara.PipelineRunTriggerType? Type631 { get; set; } /// /// /// - public global::Vectara.AgentTraceInputFile? Type632 { get; set; } + public global::Vectara.PipelineRun? Type632 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributes? Type633 { get; set; } + public global::Vectara.DeadLetterStatus? Type633 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanAttributesOutputType? Type634 { get; set; } + public global::Vectara.DeadLetterOrigin? Type634 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type635 { get; set; } + public global::Vectara.PipelineDeadLetterEntry? Type635 { get; set; } /// /// /// - public global::Vectara.InvokeAgentSpanContent? Type636 { get; set; } + public global::Vectara.ListPipelineDeadLetterEntriesResponse? Type636 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpan? Type637 { get; set; } + public global::System.Collections.Generic.IList? Type637 { get; set; } /// /// /// - public global::Vectara.InvokeAgentTraceSpanVariant2? Type638 { get; set; } + public global::Vectara.CreatePipelineDeadLetterEntryRequest? Type638 { get; set; } /// /// /// - public global::Vectara.ChatSpanAttributes? Type639 { get; set; } + public global::Vectara.ProcessPipelineDeadLetterEntriesRequest? Type639 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpan? Type640 { get; set; } + public global::Vectara.ListPipelineRunsResponse? Type640 { get; set; } /// /// /// - public global::Vectara.ChatTraceSpanVariant2? Type641 { get; set; } + public global::System.Collections.Generic.IList? Type641 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanAttributes? Type642 { get; set; } + public global::Vectara.AgentTrace? Type642 { get; set; } /// /// /// - public global::Vectara.ExecuteToolSpanContent? Type643 { get; set; } + public global::Vectara.AgentTraceStatus? Type643 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpan? Type644 { get; set; } + public global::Vectara.ListAgentTracesResponse? Type644 { get; set; } /// /// /// - public global::Vectara.ExecuteToolTraceSpanVariant2? Type645 { get; set; } + public global::System.Collections.Generic.IList? Type645 { get; set; } /// /// /// - public global::Vectara.ThinkingSpanContent? Type646 { get; set; } + public global::Vectara.AgentTraceSpanStatus? Type646 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpan? Type647 { get; set; } + public global::Vectara.AgentTraceSpanBase? Type647 { get; set; } /// /// /// - public global::Vectara.ThinkingTraceSpanVariant2? Type648 { get; set; } + public global::Vectara.AgentTraceInputFile? Type648 { get; set; } /// /// /// - public global::Vectara.OutputSpanContent? Type649 { get; set; } + public global::Vectara.InvokeAgentSpanAttributes? Type649 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpan? Type650 { get; set; } + public global::Vectara.InvokeAgentSpanAttributesOutputType? Type650 { get; set; } /// /// /// - public global::Vectara.OutputTraceSpanVariant2? Type651 { get; set; } + public global::System.Collections.Generic.IList? Type651 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanAttributes? Type652 { get; set; } + public global::Vectara.InvokeAgentSpanContent? Type652 { get; set; } /// /// /// - public global::Vectara.GuardrailSpanContent? Type653 { get; set; } + public global::Vectara.InvokeAgentTraceSpan? Type653 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpan? Type654 { get; set; } + public global::Vectara.InvokeAgentTraceSpanVariant2? Type654 { get; set; } /// /// /// - public global::Vectara.GuardrailTraceSpanVariant2? Type655 { get; set; } + public global::Vectara.ChatSpanAttributes? Type655 { get; set; } /// /// /// - public global::Vectara.StepTransitionSpanAttributes? Type656 { get; set; } + public global::Vectara.ChatTraceSpan? Type656 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpan? Type657 { get; set; } + public global::Vectara.ChatTraceSpanVariant2? Type657 { get; set; } /// /// /// - public global::Vectara.StepTransitionTraceSpanVariant2? Type658 { get; set; } + public global::Vectara.ExecuteToolSpanAttributes? Type658 { get; set; } /// /// /// - public global::Vectara.ImageReadSpanAttributes? Type659 { get; set; } + public global::Vectara.ExecuteToolSpanContent? Type659 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpan? Type660 { get; set; } + public global::Vectara.ExecuteToolTraceSpan? Type660 { get; set; } /// /// /// - public global::Vectara.ImageReadTraceSpanVariant2? Type661 { get; set; } + public global::Vectara.ExecuteToolTraceSpanVariant2? Type661 { get; set; } /// /// /// - public global::Vectara.CompactionSpanAttributes? Type662 { get; set; } + public global::Vectara.ThinkingSpanContent? Type662 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpan? Type663 { get; set; } + public global::Vectara.ThinkingTraceSpan? Type663 { get; set; } /// /// /// - public global::Vectara.CompactionTraceSpanVariant2? Type664 { get; set; } + public global::Vectara.ThinkingTraceSpanVariant2? Type664 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpan? Type665 { get; set; } + public global::Vectara.OutputSpanContent? Type665 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminator? Type666 { get; set; } + public global::Vectara.OutputTraceSpan? Type666 { get; set; } /// /// /// - public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type667 { get; set; } + public global::Vectara.OutputTraceSpanVariant2? Type667 { get; set; } /// /// /// - public global::Vectara.ListAgentTraceSpansResponse? Type668 { get; set; } + public global::Vectara.GuardrailSpanAttributes? Type668 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type669 { get; set; } + public global::Vectara.GuardrailSpanContent? Type669 { get; set; } /// /// /// - public global::Vectara.Glossary? Type670 { get; set; } + public global::Vectara.GuardrailTraceSpan? Type670 { get; set; } /// /// /// - public global::Vectara.ListGlossariesResponse? Type671 { get; set; } + public global::Vectara.GuardrailTraceSpanVariant2? Type671 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type672 { get; set; } + public global::Vectara.StepTransitionSpanAttributes? Type672 { get; set; } /// /// /// - public global::Vectara.CreateGlossaryRequest? Type673 { get; set; } + public global::Vectara.StepTransitionTraceSpan? Type673 { get; set; } /// /// /// - public global::Vectara.UpdateGlossaryRequest? Type674 { get; set; } + public global::Vectara.StepTransitionTraceSpanVariant2? Type674 { get; set; } /// /// /// - public global::Vectara.GlossaryEntry? Type675 { get; set; } + public global::Vectara.ImageReadSpanAttributes? Type675 { get; set; } /// /// /// - public global::Vectara.GlossaryEntriesResponse? Type676 { get; set; } + public global::Vectara.ImageReadTraceSpan? Type676 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type677 { get; set; } + public global::Vectara.ImageReadTraceSpanVariant2? Type677 { get; set; } /// /// /// - public global::Vectara.UpsertGlossaryEntriesRequest? Type678 { get; set; } + public global::Vectara.CompactionSpanAttributes? Type678 { get; set; } /// /// /// - public global::Vectara.DeleteGlossaryEntriesRequest? Type679 { get; set; } + public global::Vectara.CompactionTraceSpan? Type679 { get; set; } /// /// /// - public global::Vectara.GetOAuthTokenRequest? Type680 { get; set; } + public global::Vectara.CompactionTraceSpanVariant2? Type680 { get; set; } /// /// /// - public global::Vectara.CreateCorpusDocumentWaitFor? Type681 { get; set; } + public global::Vectara.AgentTraceSpan? Type681 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type682 { get; set; } + public global::Vectara.AgentTraceSpanDiscriminator? Type682 { get; set; } /// /// /// - public global::Vectara.ListToolServersType? Type683 { get; set; } + public global::Vectara.AgentTraceSpanDiscriminatorOperation? Type683 { get; set; } /// /// /// - public global::Vectara.ListToolsType? Type684 { get; set; } + public global::Vectara.ListAgentTraceSpansResponse? Type684 { get; set; } /// /// /// - public global::Vectara.ListInstructionsType? Type685 { get; set; } + public global::System.Collections.Generic.IList? Type685 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsSortBy? Type686 { get; set; } + public global::Vectara.Glossary? Type686 { get; set; } /// /// /// - public global::Vectara.ListSessionArtifactsOrderBy? Type687 { get; set; } + public global::Vectara.ListGlossariesResponse? Type687 { get; set; } /// /// /// - public global::Vectara.ListAgentConnectorsType? Type688 { get; set; } + public global::System.Collections.Generic.IList? Type688 { get; set; } /// /// /// - public global::Vectara.ListPipelinesSourceType? Type689 { get; set; } + public global::Vectara.CreateGlossaryRequest? Type689 { get; set; } /// /// /// - public global::Vectara.ListTracesStatus? Type690 { get; set; } + public global::Vectara.UpdateGlossaryRequest? Type690 { get; set; } /// /// /// - public global::Vectara.ListTracesErrorType? Type691 { get; set; } + public global::Vectara.GlossaryEntry? Type691 { get; set; } /// /// /// - public global::Vectara.ListTracesOperation? Type692 { get; set; } + public global::Vectara.GlossaryEntriesResponse? Type692 { get; set; } /// /// /// - public global::Vectara.ListTracesToolErrorType? Type693 { get; set; } + public global::System.Collections.Generic.IList? Type693 { get; set; } /// /// /// - public global::Vectara.ListTraceSpansOperation? Type694 { get; set; } + public global::Vectara.UpsertGlossaryEntriesRequest? Type694 { get; set; } /// /// /// - public global::Vectara.AllOf? Type695 { get; set; } + public global::Vectara.DeleteGlossaryEntriesRequest? Type695 { get; set; } /// /// /// - public global::Vectara.CreateUserResponse2? Type696 { get; set; } + public global::Vectara.GetOAuthTokenRequest? Type696 { get; set; } /// /// /// - public global::Vectara.ResetUserPasswordResponse? Type697 { get; set; } + public global::Vectara.CreateCorpusDocumentWaitFor? Type697 { get; set; } /// /// /// - public global::Vectara.GetTokenResponse? Type698 { get; set; } + public global::System.Collections.Generic.IList? Type698 { get; set; } + /// + /// + /// + public global::Vectara.ListToolServersType? Type699 { get; set; } + /// + /// + /// + public global::Vectara.ListToolsType? Type700 { get; set; } + /// + /// + /// + public global::Vectara.ListInstructionsType? Type701 { get; set; } + /// + /// + /// + public global::Vectara.ListSessionArtifactsSortBy? Type702 { get; set; } + /// + /// + /// + public global::Vectara.ListSessionArtifactsOrderBy? Type703 { get; set; } + /// + /// + /// + public global::Vectara.ListAgentConnectorsType? Type704 { get; set; } + /// + /// + /// + public global::Vectara.ListPipelinesSourceType? Type705 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesStatus? Type706 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesErrorType? Type707 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesOperation? Type708 { get; set; } + /// + /// + /// + public global::Vectara.ListTracesToolErrorType? Type709 { get; set; } + /// + /// + /// + public global::Vectara.ListTraceSpansOperation? Type710 { get; set; } + /// + /// + /// + public global::Vectara.AllOf? Type711 { get; set; } + /// + /// + /// + public global::Vectara.CreateUserResponse2? Type712 { get; set; } + /// + /// + /// + public global::Vectara.ResetUserPasswordResponse? Type713 { get; set; } + /// + /// + /// + public global::Vectara.GetTokenResponse? Type714 { get; set; } /// /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.Agent.g.cs b/src/libs/Vectara/Generated/Vectara.Models.Agent.g.cs index bb38c2df..06446815 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.Agent.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.Agent.g.cs @@ -41,7 +41,7 @@ public sealed partial class Agent /// {"customer_search":{"type":"corpora_search","argument_override":{"query":"customer support documentation"}}} [global::System.Text.Json.Serialization.JsonPropertyName("tool_configurations")] [global::System.Text.Json.Serialization.JsonRequired] - public required object ToolConfigurations { get; set; } + public required global::System.Collections.Generic.Dictionary ToolConfigurations { get; set; } /// /// A map of skills available to the agent, keyed by skill name.
@@ -110,11 +110,16 @@ public sealed partial class Agent public global::Vectara.CompactionConfig? Compaction { get; set; } /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. ///
[global::System.Text.Json.Serialization.JsonPropertyName("tool_output_offloading")] public global::Vectara.ToolOutputOffloadingConfiguration? ToolOutputOffloading { get; set; } @@ -195,11 +200,16 @@ public sealed partial class Agent /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// /// /// Timestamp when the agent was created.
@@ -215,7 +225,7 @@ public sealed partial class Agent public Agent( string key, string name, - object toolConfigurations, + global::System.Collections.Generic.Dictionary toolConfigurations, global::Vectara.AgentModel model, global::Vectara.FirstAgentStep firstStep, bool enabled, diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.Json.g.cs new file mode 100644 index 00000000..eab71148 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class AgentToolConfigurationBase + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.AgentToolConfigurationBase? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.AgentToolConfigurationBase), + jsonSerializerContext) as global::Vectara.AgentToolConfigurationBase; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.AgentToolConfigurationBase? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.AgentToolConfigurationBase), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.AgentToolConfigurationBase; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.g.cs new file mode 100644 index 00000000..2b21a495 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.AgentToolConfigurationBase.g.cs @@ -0,0 +1,103 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// Base properties shared by all inline tool configurations on an agent. + /// + public sealed partial class AgentToolConfigurationBase + { + /// + /// Optional override for the tool's description shown to the LLM. When set, replaces the description from the underlying tool definition.
+ /// Example: Search the customer support knowledge base + ///
+ /// Search the customer support knowledge base + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
+ /// Available Velocity variables:
+ /// - `$agent.name` - Agent name
+ /// - `$agent.metadata` - Agent metadata map
+ /// - `$session.key` - Session key
+ /// - `$session.metadata` - Session metadata map
+ /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
+ /// Example: "Search tool configured for agent $agent.name on $currentDate" + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] + public string? DescriptionTemplate { get; set; } + + /// + /// An optional jq expression applied to the tool's JSON output before it is returned to the LLM.
+ /// Use this to project, filter, or summarize tool output to keep responses concise and on-topic.
+ /// The expression operates on the tool's response JSON and the result replaces the original output.
+ /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the LLM as
+ /// an error so the agent can react.
+ /// Examples:
+ /// - `.results | map({title, url})` — keep only title/url for each result
+ /// - `.items[0:5]` — first 5 items
+ /// - `del(.debug)` — drop a noisy field
+ /// Example: .results | map({title, url}) + ///
+ /// .results | map({title, url}) + [global::System.Text.Json.Serialization.JsonPropertyName("output_transform")] + public string? OutputTransform { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Optional override for the tool's description shown to the LLM. When set, replaces the description from the underlying tool definition.
+ /// Example: Search the customer support knowledge base + /// + /// + /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
+ /// Available Velocity variables:
+ /// - `$agent.name` - Agent name
+ /// - `$agent.metadata` - Agent metadata map
+ /// - `$session.key` - Session key
+ /// - `$session.metadata` - Session metadata map
+ /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
+ /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// + /// + /// An optional jq expression applied to the tool's JSON output before it is returned to the LLM.
+ /// Use this to project, filter, or summarize tool output to keep responses concise and on-topic.
+ /// The expression operates on the tool's response JSON and the result replaces the original output.
+ /// If the expression fails to compile or evaluate at runtime, the tool call is reported to the LLM as
+ /// an error so the agent can react.
+ /// Examples:
+ /// - `.results | map({title, url})` — keep only title/url for each result
+ /// - `.items[0:5]` — first 5 items
+ /// - `del(.debug)` — drop a noisy field
+ /// Example: .results | map({title, url}) + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public AgentToolConfigurationBase( + string? description, + string? descriptionTemplate, + string? outputTransform) + { + this.Description = description; + this.DescriptionTemplate = descriptionTemplate; + this.OutputTransform = outputTransform; + } + + /// + /// Initializes a new instance of the class. + /// + public AgentToolConfigurationBase() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReference.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReference.g.cs index 6cf75b14..e318dd53 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ArtifactReference.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ArtifactReference.g.cs @@ -7,7 +7,7 @@ namespace Vectara /// Reference to an artifact stored in the agent session workspace.
/// Artifacts are files or documents that belong to a specific agent session, providing a persistent workspace where agents and users can share files throughout a conversation. When users upload files (such as PDFs, Word documents, PowerPoint presentations, or images) to an agent session, these files are stored as artifacts that remain available for the duration of the session.
/// **Session Binding**: Each artifact is scoped to a specific agent session and cannot be accessed from other sessions, ensuring data privacy and security.
- /// **Lifecycle**: Artifacts are created when users upload files via multipart requests or when agent tools generate new files (such as converting a PDF to markdown). Artifacts have a configurable time-to-live and are automatically removed when they expire or when the session is deleted. Size limits apply to individual artifacts and total session storage.
+ /// **Lifecycle**: Artifacts are created when users upload files via multipart requests or when agent tools generate new files (such as converting a PDF to markdown). Artifacts have a configurable time-to-live and are automatically removed when they expire or when the session is deleted. A per-artifact size limit applies to each upload.
/// **How Agents Use Artifacts**: Agent tools can read artifacts, process them, and create new derived artifacts. For example, the document conversion tool can take a PDF artifact, convert it to markdown, and store the result as a new artifact. This enables multi-step document processing workflows within a single session.
/// **Common Use Cases**: Upload a document for the agent to analyze, provide multiple reference files for context, enable the agent to convert between formats, or allow the agent to generate and store processed files for later retrieval. ///
diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateAgentRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentRequest.g.cs index 5618ddda..940d069c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateAgentRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAgentRequest.g.cs @@ -41,7 +41,7 @@ public sealed partial class CreateAgentRequest /// {"customer_search":{"type":"corpora_search","argument_override":{"query":"customer support documentation"}}} [global::System.Text.Json.Serialization.JsonPropertyName("tool_configurations")] [global::System.Text.Json.Serialization.JsonRequired] - public required object ToolConfigurations { get; set; } + public required global::System.Collections.Generic.Dictionary ToolConfigurations { get; set; } /// /// A map of skills available to the agent, keyed by skill name.
@@ -110,11 +110,16 @@ public sealed partial class CreateAgentRequest public global::Vectara.CompactionConfig? Compaction { get; set; } /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. ///
[global::System.Text.Json.Serialization.JsonPropertyName("tool_output_offloading")] public global::Vectara.ToolOutputOffloadingConfiguration? ToolOutputOffloading { get; set; } @@ -181,18 +186,23 @@ public sealed partial class CreateAgentRequest /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public CreateAgentRequest( string name, - object toolConfigurations, + global::System.Collections.Generic.Dictionary toolConfigurations, global::Vectara.AgentModel model, string? key, string? description, diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateAnthropicLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateAnthropicLLMRequest.g.cs index 67bb98ca..9f28aa20 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateAnthropicLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateAnthropicLLMRequest.g.cs @@ -60,6 +60,14 @@ public sealed partial class CreateAnthropicLLMRequest [global::System.Text.Json.Serialization.JsonPropertyName("headers")] public global::System.Collections.Generic.Dictionary? Headers { get; set; } + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + ///
+ /// 300 + [global::System.Text.Json.Serialization.JsonPropertyName("idle_timeout_seconds")] + public int? IdleTimeoutSeconds { get; set; } + /// /// Any additional parameters that are required for the LLM during the test call. /// @@ -67,7 +75,7 @@ public sealed partial class CreateAnthropicLLMRequest public object? TestModelParameters { get; set; } /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// [global::System.Text.Json.Serialization.JsonPropertyName("capabilities")] public global::Vectara.LLMCapabilities? Capabilities { get; set; } @@ -105,11 +113,15 @@ public sealed partial class CreateAnthropicLLMRequest /// /// Optional additional headers to send with the request /// + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + /// /// /// Any additional parameters that are required for the LLM during the test call. /// /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -122,6 +134,7 @@ public CreateAnthropicLLMRequest( string? description, string? uri, global::System.Collections.Generic.Dictionary? headers, + int? idleTimeoutSeconds, object? testModelParameters, global::Vectara.LLMCapabilities? capabilities) { @@ -132,6 +145,7 @@ public CreateAnthropicLLMRequest( this.Uri = uri; this.Auth = auth; this.Headers = headers; + this.IdleTimeoutSeconds = idleTimeoutSeconds; this.TestModelParameters = testModelParameters; this.Capabilities = capabilities; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequest.g.cs index 028d33aa..d3128cc0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.CreateVertexAILLMRequest.g.cs @@ -57,6 +57,14 @@ public sealed partial class CreateVertexAILLMRequest [global::System.Text.Json.Serialization.JsonRequired] public required global::Vectara.VertexAiAuth Auth { get; set; } + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + ///
+ /// 300 + [global::System.Text.Json.Serialization.JsonPropertyName("idle_timeout_seconds")] + public int? IdleTimeoutSeconds { get; set; } + /// /// Any additional parameters that are required for the LLM during the test call. /// @@ -64,7 +72,7 @@ public sealed partial class CreateVertexAILLMRequest public object? TestModelParameters { get; set; } /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// [global::System.Text.Json.Serialization.JsonPropertyName("capabilities")] public global::Vectara.LLMCapabilities? Capabilities { get; set; } @@ -101,11 +109,15 @@ public sealed partial class CreateVertexAILLMRequest /// /// Description of the LLM. /// + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + /// /// /// Any additional parameters that are required for the LLM during the test call. /// /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -117,6 +129,7 @@ public CreateVertexAILLMRequest( string uri, global::Vectara.VertexAiAuth auth, string? description, + int? idleTimeoutSeconds, object? testModelParameters, global::Vectara.LLMCapabilities? capabilities) { @@ -126,6 +139,7 @@ public CreateVertexAILLMRequest( this.Model = model ?? throw new global::System.ArgumentNullException(nameof(model)); this.Uri = uri ?? throw new global::System.ArgumentNullException(nameof(uri)); this.Auth = auth; + this.IdleTimeoutSeconds = idleTimeoutSeconds; this.TestModelParameters = testModelParameters; this.Capabilities = capabilities; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.Json.g.cs index fcebef45..a83ef36f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineArtifactCreateToolConfiguration + public readonly partial struct InlineArtifactCreateToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineArtifactCreateToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineArtifactCreateToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineArtifactCreateToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineArtifactCreateToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactCreateToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactCreateToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs index 6874e8d7..8d086c3c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,69 +7,215 @@ namespace Vectara /// /// An artifact create tool configuration defined inline in the agent for creating artifacts on-the-fly from text or structured data content. /// - public sealed partial class InlineArtifactCreateToolConfiguration + public readonly partial struct InlineArtifactCreateToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'artifact_create' for inline artifact create tool configurations.
- /// Default Value: artifact_create + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "artifact_create" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "artifact_create"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); +#if NET6_0_OR_GREATER + public global::Vectara.InlineArtifactCreateToolConfigurationVariant2? InlineArtifactCreateToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineArtifactCreateToolConfigurationVariant2? InlineArtifactCreateToolConfigurationVariant2 { get; } +#endif /// - /// Initializes a new instance of the class. + /// /// - /// - /// The type of tool configuration, which is always 'artifact_create' for inline artifact create tool configurations.
- /// Default Value: artifact_create - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineArtifactCreateToolConfigurationVariant2))] #endif + public bool IsInlineArtifactCreateToolConfigurationVariant2 => InlineArtifactCreateToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineArtifactCreateToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineArtifactCreateToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineArtifactCreateToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineArtifactCreateToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineArtifactCreateToolConfiguration(global::Vectara.InlineArtifactCreateToolConfigurationVariant2 value) => new InlineArtifactCreateToolConfiguration((global::Vectara.InlineArtifactCreateToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineArtifactCreateToolConfigurationVariant2?(InlineArtifactCreateToolConfiguration @this) => @this.InlineArtifactCreateToolConfigurationVariant2; + + /// + /// + /// + public InlineArtifactCreateToolConfiguration(global::Vectara.InlineArtifactCreateToolConfigurationVariant2? value) + { + InlineArtifactCreateToolConfigurationVariant2 = value; + } + + /// + /// + /// public InlineArtifactCreateToolConfiguration( - string type, - string? descriptionTemplate) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineArtifactCreateToolConfigurationVariant2? inlineArtifactCreateToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineArtifactCreateToolConfigurationVariant2 = inlineArtifactCreateToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineArtifactCreateToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineArtifactCreateToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineArtifactCreateToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineArtifactCreateToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineArtifactCreateToolConfigurationVariant2 && inlineArtifactCreateToolConfigurationVariant2 != null) + { + return inlineArtifactCreateToolConfigurationVariant2(InlineArtifactCreateToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineArtifactCreateToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineArtifactCreateToolConfigurationVariant2) + { + inlineArtifactCreateToolConfigurationVariant2?.Invoke(InlineArtifactCreateToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineArtifactCreateToolConfigurationVariant2, + typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineArtifactCreateToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineArtifactCreateToolConfigurationVariant2, other.InlineArtifactCreateToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineArtifactCreateToolConfiguration obj1, InlineArtifactCreateToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineArtifactCreateToolConfiguration obj1, InlineArtifactCreateToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineArtifactCreateToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineArtifactCreateToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..80eaf2d8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineArtifactCreateToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineArtifactCreateToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineArtifactCreateToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineArtifactCreateToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineArtifactCreateToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactCreateToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..bc2abba8 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactCreateToolConfigurationVariant2.g.cs @@ -0,0 +1,49 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineArtifactCreateToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'artifact_create' for inline artifact create tool configurations.
+ /// Default Value: artifact_create + ///
+ /// "artifact_create" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "artifact_create"; + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'artifact_create' for inline artifact create tool configurations.
+ /// Default Value: artifact_create + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineArtifactCreateToolConfigurationVariant2( + string type) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + } + + /// + /// Initializes a new instance of the class. + /// + public InlineArtifactCreateToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.Json.g.cs index e2649bb8..dbf21db7 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineArtifactGrepToolConfiguration + public readonly partial struct InlineArtifactGrepToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineArtifactGrepToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineArtifactGrepToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineArtifactGrepToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineArtifactGrepToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactGrepToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactGrepToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs index f3cf10ca..6c533a9f 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,80 +7,215 @@ namespace Vectara /// /// An artifact grep tool configuration defined inline in the agent for searching through artifact content. /// - public sealed partial class InlineArtifactGrepToolConfiguration + public readonly partial struct InlineArtifactGrepToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'artifact_grep' for inline artifact grep tool configurations.
- /// Default Value: artifact_grep + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "artifact_grep" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "artifact_grep"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the LLM to fill in. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.ArtifactGrepToolParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineArtifactGrepToolConfigurationVariant2? InlineArtifactGrepToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineArtifactGrepToolConfigurationVariant2? InlineArtifactGrepToolConfigurationVariant2 { get; } +#endif /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineArtifactGrepToolConfigurationVariant2))] +#endif + public bool IsInlineArtifactGrepToolConfigurationVariant2 => InlineArtifactGrepToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineArtifactGrepToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineArtifactGrepToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Initializes a new instance of the class. + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineArtifactGrepToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineArtifactGrepToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineArtifactGrepToolConfiguration(global::Vectara.InlineArtifactGrepToolConfigurationVariant2 value) => new InlineArtifactGrepToolConfiguration((global::Vectara.InlineArtifactGrepToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineArtifactGrepToolConfigurationVariant2?(InlineArtifactGrepToolConfiguration @this) => @this.InlineArtifactGrepToolConfigurationVariant2; + + /// + /// + /// + public InlineArtifactGrepToolConfiguration(global::Vectara.InlineArtifactGrepToolConfigurationVariant2? value) + { + InlineArtifactGrepToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'artifact_grep' for inline artifact grep tool configurations.
- /// Default Value: artifact_grep - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the LLM to fill in. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineArtifactGrepToolConfiguration( - string type, - string? descriptionTemplate, - global::Vectara.ArtifactGrepToolParameters? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineArtifactGrepToolConfigurationVariant2? inlineArtifactGrepToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineArtifactGrepToolConfigurationVariant2 = inlineArtifactGrepToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineArtifactGrepToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineArtifactGrepToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineArtifactGrepToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineArtifactGrepToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineArtifactGrepToolConfigurationVariant2 && inlineArtifactGrepToolConfigurationVariant2 != null) + { + return inlineArtifactGrepToolConfigurationVariant2(InlineArtifactGrepToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineArtifactGrepToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineArtifactGrepToolConfigurationVariant2) + { + inlineArtifactGrepToolConfigurationVariant2?.Invoke(InlineArtifactGrepToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineArtifactGrepToolConfigurationVariant2, + typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineArtifactGrepToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineArtifactGrepToolConfigurationVariant2, other.InlineArtifactGrepToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineArtifactGrepToolConfiguration obj1, InlineArtifactGrepToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineArtifactGrepToolConfiguration obj1, InlineArtifactGrepToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineArtifactGrepToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineArtifactGrepToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..a6366179 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineArtifactGrepToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineArtifactGrepToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineArtifactGrepToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineArtifactGrepToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineArtifactGrepToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactGrepToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..8129f497 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactGrepToolConfigurationVariant2.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineArtifactGrepToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'artifact_grep' for inline artifact grep tool configurations.
+ /// Default Value: artifact_grep + ///
+ /// "artifact_grep" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "artifact_grep"; + + /// + /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the LLM to fill in. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.ArtifactGrepToolParameters? ArgumentOverride { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'artifact_grep' for inline artifact grep tool configurations.
+ /// Default Value: artifact_grep + /// + /// + /// Configurable parameters for the artifact grep tool. If not overridden, they will be required by the LLM to fill in. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineArtifactGrepToolConfigurationVariant2( + string type, + global::Vectara.ArtifactGrepToolParameters? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineArtifactGrepToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.Json.g.cs index 74e2c95f..86d6af17 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineArtifactReadToolConfiguration + public readonly partial struct InlineArtifactReadToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineArtifactReadToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineArtifactReadToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineArtifactReadToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineArtifactReadToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactReadToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactReadToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs index e55f5647..efb5da94 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,91 +7,215 @@ namespace Vectara /// /// An artifact read tool configuration defined inline in the agent for reading artifacts from the session workspace. /// - public sealed partial class InlineArtifactReadToolConfiguration + public readonly partial struct InlineArtifactReadToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'artifact_read' for inline artifact read tool configurations.
- /// Default Value: artifact_read + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "artifact_read" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "artifact_read"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the LLM to fill in. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.ArtifactReadToolParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineArtifactReadToolConfigurationVariant2? InlineArtifactReadToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineArtifactReadToolConfigurationVariant2? InlineArtifactReadToolConfigurationVariant2 { get; } +#endif /// - /// User-configurable settings for the artifact read tool. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_configuration")] - public global::Vectara.ArtifactReadConfiguration? ToolConfiguration { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineArtifactReadToolConfigurationVariant2))] +#endif + public bool IsInlineArtifactReadToolConfigurationVariant2 => InlineArtifactReadToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineArtifactReadToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineArtifactReadToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineArtifactReadToolConfiguration @this) => @this.AgentBase; /// - /// Initializes a new instance of the class. + /// + /// + public InlineArtifactReadToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineArtifactReadToolConfiguration(global::Vectara.InlineArtifactReadToolConfigurationVariant2 value) => new InlineArtifactReadToolConfiguration((global::Vectara.InlineArtifactReadToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineArtifactReadToolConfigurationVariant2?(InlineArtifactReadToolConfiguration @this) => @this.InlineArtifactReadToolConfigurationVariant2; + + /// + /// + /// + public InlineArtifactReadToolConfiguration(global::Vectara.InlineArtifactReadToolConfigurationVariant2? value) + { + InlineArtifactReadToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'artifact_read' for inline artifact read tool configurations.
- /// Default Value: artifact_read - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the LLM to fill in. - /// - /// - /// User-configurable settings for the artifact read tool. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineArtifactReadToolConfiguration( - string type, - string? descriptionTemplate, - global::Vectara.ArtifactReadToolParameters? argumentOverride, - global::Vectara.ArtifactReadConfiguration? toolConfiguration) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineArtifactReadToolConfigurationVariant2? inlineArtifactReadToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineArtifactReadToolConfigurationVariant2 = inlineArtifactReadToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineArtifactReadToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineArtifactReadToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineArtifactReadToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineArtifactReadToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineArtifactReadToolConfigurationVariant2 && inlineArtifactReadToolConfigurationVariant2 != null) + { + return inlineArtifactReadToolConfigurationVariant2(InlineArtifactReadToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineArtifactReadToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineArtifactReadToolConfigurationVariant2) + { + inlineArtifactReadToolConfigurationVariant2?.Invoke(InlineArtifactReadToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineArtifactReadToolConfigurationVariant2, + typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineArtifactReadToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineArtifactReadToolConfigurationVariant2, other.InlineArtifactReadToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineArtifactReadToolConfiguration obj1, InlineArtifactReadToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineArtifactReadToolConfiguration obj1, InlineArtifactReadToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; - this.ToolConfiguration = toolConfiguration; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineArtifactReadToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineArtifactReadToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..8491b760 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineArtifactReadToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineArtifactReadToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineArtifactReadToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineArtifactReadToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineArtifactReadToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineArtifactReadToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..b16e67fa --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineArtifactReadToolConfigurationVariant2.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineArtifactReadToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'artifact_read' for inline artifact read tool configurations.
+ /// Default Value: artifact_read + ///
+ /// "artifact_read" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "artifact_read"; + + /// + /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the LLM to fill in. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.ArtifactReadToolParameters? ArgumentOverride { get; set; } + + /// + /// User-configurable settings for the artifact read tool. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_configuration")] + public global::Vectara.ArtifactReadConfiguration? ToolConfiguration { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'artifact_read' for inline artifact read tool configurations.
+ /// Default Value: artifact_read + /// + /// + /// Configurable parameters for the artifact read tool. If not overridden, they will be required by the LLM to fill in. + /// + /// + /// User-configurable settings for the artifact read tool. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineArtifactReadToolConfigurationVariant2( + string type, + global::Vectara.ArtifactReadToolParameters? argumentOverride, + global::Vectara.ArtifactReadConfiguration? toolConfiguration) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + this.ToolConfiguration = toolConfiguration; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineArtifactReadToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.Json.g.cs index 24599b52..fa4f020b 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineCorporaSearchToolConfiguration + public readonly partial struct InlineCorporaSearchToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineCorporaSearchToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineCorporaSearchToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineCorporaSearchToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineCorporaSearchToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineCorporaSearchToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineCorporaSearchToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs index e823ee16..ad2a8762 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,92 +7,215 @@ namespace Vectara /// /// A corpora search tool configuration defined inline in the agent. /// - public sealed partial class InlineCorporaSearchToolConfiguration + public readonly partial struct InlineCorporaSearchToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'corpora_search' for inline corpora search tool configurations.
- /// Default Value: corpora_search + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "corpora_search" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "corpora_search"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// LLM-exposed parameters for the corpora search tool that can be filled in during execution. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.CorporaSearchToolParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineCorporaSearchToolConfigurationVariant2? InlineCorporaSearchToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineCorporaSearchToolConfigurationVariant2? InlineCorporaSearchToolConfigurationVariant2 { get; } +#endif /// - /// Agent-specific query configuration that supports eager references. Use this in agent tool configurations when turn-start resolution is needed. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("query_configuration")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Vectara.AgentCorporaSearchQueryConfiguration QueryConfiguration { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineCorporaSearchToolConfigurationVariant2))] +#endif + public bool IsInlineCorporaSearchToolConfigurationVariant2 => InlineCorporaSearchToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineCorporaSearchToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineCorporaSearchToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineCorporaSearchToolConfiguration @this) => @this.AgentBase; /// - /// Initializes a new instance of the class. + /// + /// + public InlineCorporaSearchToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineCorporaSearchToolConfiguration(global::Vectara.InlineCorporaSearchToolConfigurationVariant2 value) => new InlineCorporaSearchToolConfiguration((global::Vectara.InlineCorporaSearchToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineCorporaSearchToolConfigurationVariant2?(InlineCorporaSearchToolConfiguration @this) => @this.InlineCorporaSearchToolConfigurationVariant2; + + /// + /// + /// + public InlineCorporaSearchToolConfiguration(global::Vectara.InlineCorporaSearchToolConfigurationVariant2? value) + { + InlineCorporaSearchToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'corpora_search' for inline corpora search tool configurations.
- /// Default Value: corpora_search - /// - /// - /// Agent-specific query configuration that supports eager references. Use this in agent tool configurations when turn-start resolution is needed. - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// LLM-exposed parameters for the corpora search tool that can be filled in during execution. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineCorporaSearchToolConfiguration( - string type, - global::Vectara.AgentCorporaSearchQueryConfiguration queryConfiguration, - string? descriptionTemplate, - global::Vectara.CorporaSearchToolParameters? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineCorporaSearchToolConfigurationVariant2? inlineCorporaSearchToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineCorporaSearchToolConfigurationVariant2 = inlineCorporaSearchToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineCorporaSearchToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineCorporaSearchToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineCorporaSearchToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineCorporaSearchToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineCorporaSearchToolConfigurationVariant2 && inlineCorporaSearchToolConfigurationVariant2 != null) + { + return inlineCorporaSearchToolConfigurationVariant2(InlineCorporaSearchToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineCorporaSearchToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineCorporaSearchToolConfigurationVariant2) + { + inlineCorporaSearchToolConfigurationVariant2?.Invoke(InlineCorporaSearchToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineCorporaSearchToolConfigurationVariant2, + typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineCorporaSearchToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineCorporaSearchToolConfigurationVariant2, other.InlineCorporaSearchToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineCorporaSearchToolConfiguration obj1, InlineCorporaSearchToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineCorporaSearchToolConfiguration obj1, InlineCorporaSearchToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; - this.QueryConfiguration = queryConfiguration ?? throw new global::System.ArgumentNullException(nameof(queryConfiguration)); + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineCorporaSearchToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineCorporaSearchToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..e39f3c47 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineCorporaSearchToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineCorporaSearchToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineCorporaSearchToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineCorporaSearchToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineCorporaSearchToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineCorporaSearchToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..969ab670 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineCorporaSearchToolConfigurationVariant2.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineCorporaSearchToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'corpora_search' for inline corpora search tool configurations.
+ /// Default Value: corpora_search + ///
+ /// "corpora_search" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "corpora_search"; + + /// + /// LLM-exposed parameters for the corpora search tool that can be filled in during execution. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.CorporaSearchToolParameters? ArgumentOverride { get; set; } + + /// + /// Agent-specific query configuration that supports eager references. Use this in agent tool configurations when turn-start resolution is needed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("query_configuration")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.AgentCorporaSearchQueryConfiguration QueryConfiguration { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'corpora_search' for inline corpora search tool configurations.
+ /// Default Value: corpora_search + /// + /// + /// Agent-specific query configuration that supports eager references. Use this in agent tool configurations when turn-start resolution is needed. + /// + /// + /// LLM-exposed parameters for the corpora search tool that can be filled in during execution. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineCorporaSearchToolConfigurationVariant2( + string type, + global::Vectara.AgentCorporaSearchQueryConfiguration queryConfiguration, + global::Vectara.CorporaSearchToolParameters? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + this.QueryConfiguration = queryConfiguration ?? throw new global::System.ArgumentNullException(nameof(queryConfiguration)); + } + + /// + /// Initializes a new instance of the class. + /// + public InlineCorporaSearchToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.Json.g.cs index bec1e577..1389f5f3 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineDocumentConversionToolConfiguration + public readonly partial struct InlineDocumentConversionToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineDocumentConversionToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineDocumentConversionToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineDocumentConversionToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineDocumentConversionToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineDocumentConversionToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineDocumentConversionToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs index c3cb8582..9523c96e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,80 +7,215 @@ namespace Vectara /// /// A document conversion tool configuration defined inline in the agent for converting document artifacts to various formats. /// - public sealed partial class InlineDocumentConversionToolConfiguration + public readonly partial struct InlineDocumentConversionToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'document_conversion' for inline document conversion tool configurations.
- /// Default Value: document_conversion + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "document_conversion" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "document_conversion"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the LLM to fill in. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.DocumentConversionToolParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineDocumentConversionToolConfigurationVariant2? InlineDocumentConversionToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineDocumentConversionToolConfigurationVariant2? InlineDocumentConversionToolConfigurationVariant2 { get; } +#endif /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineDocumentConversionToolConfigurationVariant2))] +#endif + public bool IsInlineDocumentConversionToolConfigurationVariant2 => InlineDocumentConversionToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineDocumentConversionToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineDocumentConversionToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Initializes a new instance of the class. + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineDocumentConversionToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineDocumentConversionToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineDocumentConversionToolConfiguration(global::Vectara.InlineDocumentConversionToolConfigurationVariant2 value) => new InlineDocumentConversionToolConfiguration((global::Vectara.InlineDocumentConversionToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineDocumentConversionToolConfigurationVariant2?(InlineDocumentConversionToolConfiguration @this) => @this.InlineDocumentConversionToolConfigurationVariant2; + + /// + /// + /// + public InlineDocumentConversionToolConfiguration(global::Vectara.InlineDocumentConversionToolConfigurationVariant2? value) + { + InlineDocumentConversionToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'document_conversion' for inline document conversion tool configurations.
- /// Default Value: document_conversion - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the LLM to fill in. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineDocumentConversionToolConfiguration( - string type, - string? descriptionTemplate, - global::Vectara.DocumentConversionToolParameters? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineDocumentConversionToolConfigurationVariant2? inlineDocumentConversionToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineDocumentConversionToolConfigurationVariant2 = inlineDocumentConversionToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineDocumentConversionToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineDocumentConversionToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineDocumentConversionToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineDocumentConversionToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineDocumentConversionToolConfigurationVariant2 && inlineDocumentConversionToolConfigurationVariant2 != null) + { + return inlineDocumentConversionToolConfigurationVariant2(InlineDocumentConversionToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineDocumentConversionToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineDocumentConversionToolConfigurationVariant2) + { + inlineDocumentConversionToolConfigurationVariant2?.Invoke(InlineDocumentConversionToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineDocumentConversionToolConfigurationVariant2, + typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineDocumentConversionToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineDocumentConversionToolConfigurationVariant2, other.InlineDocumentConversionToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineDocumentConversionToolConfiguration obj1, InlineDocumentConversionToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineDocumentConversionToolConfiguration obj1, InlineDocumentConversionToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineDocumentConversionToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineDocumentConversionToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..dedbb847 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineDocumentConversionToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineDocumentConversionToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineDocumentConversionToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineDocumentConversionToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineDocumentConversionToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineDocumentConversionToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..628cd01d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDocumentConversionToolConfigurationVariant2.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineDocumentConversionToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'document_conversion' for inline document conversion tool configurations.
+ /// Default Value: document_conversion + ///
+ /// "document_conversion" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "document_conversion"; + + /// + /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the LLM to fill in. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.DocumentConversionToolParameters? ArgumentOverride { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'document_conversion' for inline document conversion tool configurations.
+ /// Default Value: document_conversion + /// + /// + /// Configurable parameters for the document conversion tool. If not overridden, they will be required by the LLM to fill in. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineDocumentConversionToolConfigurationVariant2( + string type, + global::Vectara.DocumentConversionToolParameters? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineDocumentConversionToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.Json.g.cs index aabd2ab1..b37c8825 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineDynamicVectaraToolConfiguration + public readonly partial struct InlineDynamicVectaraToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineDynamicVectaraToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineDynamicVectaraToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineDynamicVectaraToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineDynamicVectaraToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineDynamicVectaraToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineDynamicVectaraToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs index 2d11c9ed..1dda9a32 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,116 +7,215 @@ namespace Vectara /// /// An inline configuration for built-in Vectara tools that have implementations within the platform but do not have a dedicated configuration type schema. Use the List Tools endpoint to discover available tools and obtain the `tool_id` required for this configuration. /// - public sealed partial class InlineDynamicVectaraToolConfiguration + public readonly partial struct InlineDynamicVectaraToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'dynamic_vectara' for generic Vectara tool configurations.
- /// Default Value: dynamic_vectara - ///
- /// "dynamic_vectara" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "dynamic_vectara"; - - /// - /// Unique identifier for a tool.
- /// Example: tol_123e4567-e89b-12d3-a456-426614174000 - ///
- /// tol_123e4567-e89b-12d3-a456-426614174000 - [global::System.Text.Json.Serialization.JsonPropertyName("tool_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ToolId { get; set; } - - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } - - /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
- /// The values can also be dynamic references to context values using $ref with dot notation path syntax:
- /// - Static value: "fixed_value" or 123
- /// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
- /// References are resolved at runtime from context:
- /// - session.metadata.* - Access session metadata fields
- /// - agent.metadata.* - Access agent metadata fields
- /// Example:
- /// `{"query": {"$ref": ".session.metadata.query"}}`
- /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
- /// Example: {"custom_param":"value","limit":10} - ///
- /// {"custom_param":"value","limit":10} - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public object? ArgumentOverride { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The type of tool configuration, which is always 'dynamic_vectara' for generic Vectara tool configurations.
- /// Default Value: dynamic_vectara - /// - /// - /// Unique identifier for a tool.
- /// Example: tol_123e4567-e89b-12d3-a456-426614174000 - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
- /// The values can also be dynamic references to context values using $ref with dot notation path syntax:
- /// - Static value: "fixed_value" or 123
- /// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
- /// References are resolved at runtime from context:
- /// - session.metadata.* - Access session metadata fields
- /// - agent.metadata.* - Access agent metadata fields
- /// Example:
- /// `{"query": {"$ref": ".session.metadata.query"}}`
- /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
- /// Example: {"custom_param":"value","limit":10} - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + /// Base properties shared by all inline tool configurations on an agent. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] #endif + public bool IsAgentBase => AgentBase != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? InlineDynamicVectaraToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? InlineDynamicVectaraToolConfigurationVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineDynamicVectaraToolConfigurationVariant2))] +#endif + public bool IsInlineDynamicVectaraToolConfigurationVariant2 => InlineDynamicVectaraToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineDynamicVectaraToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineDynamicVectaraToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineDynamicVectaraToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineDynamicVectaraToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineDynamicVectaraToolConfiguration(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2 value) => new InlineDynamicVectaraToolConfiguration((global::Vectara.InlineDynamicVectaraToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineDynamicVectaraToolConfigurationVariant2?(InlineDynamicVectaraToolConfiguration @this) => @this.InlineDynamicVectaraToolConfigurationVariant2; + + /// + /// + /// + public InlineDynamicVectaraToolConfiguration(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? value) + { + InlineDynamicVectaraToolConfigurationVariant2 = value; + } + + /// + /// + /// public InlineDynamicVectaraToolConfiguration( - string type, - string toolId, - string? descriptionTemplate, - object? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? inlineDynamicVectaraToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineDynamicVectaraToolConfigurationVariant2 = inlineDynamicVectaraToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineDynamicVectaraToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineDynamicVectaraToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineDynamicVectaraToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineDynamicVectaraToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineDynamicVectaraToolConfigurationVariant2 && inlineDynamicVectaraToolConfigurationVariant2 != null) + { + return inlineDynamicVectaraToolConfigurationVariant2(InlineDynamicVectaraToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineDynamicVectaraToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineDynamicVectaraToolConfigurationVariant2) + { + inlineDynamicVectaraToolConfigurationVariant2?.Invoke(InlineDynamicVectaraToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineDynamicVectaraToolConfigurationVariant2, + typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineDynamicVectaraToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineDynamicVectaraToolConfigurationVariant2, other.InlineDynamicVectaraToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineDynamicVectaraToolConfiguration obj1, InlineDynamicVectaraToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineDynamicVectaraToolConfiguration obj1, InlineDynamicVectaraToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.ToolId = toolId ?? throw new global::System.ArgumentNullException(nameof(toolId)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineDynamicVectaraToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineDynamicVectaraToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationArgumentOverride.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.Json.g.cs similarity index 89% rename from src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationArgumentOverride.Json.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.Json.g.cs index 1de6abbb..fa66406c 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationArgumentOverride.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineDynamicVectaraToolConfigurationArgumentOverride + public sealed partial class InlineDynamicVectaraToolConfigurationVariant2 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Vectara.InlineDynamicVectaraToolConfigurationArgumentOverride? FromJson( + public static global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Vectara.InlineDynamicVectaraToolConfigurationArgumentOverride), - jsonSerializerContext) as global::Vectara.InlineDynamicVectaraToolConfigurationArgumentOverride; + typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineDynamicVectaraToolConfigurationVariant2; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Vectara.InlineDynamicVectaraToolConfigurationArgumentOverride? FromJson( + public static global::Vectara.InlineDynamicVectaraToolConfigurationVariant2? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Vectara.InlineDynamicVectaraToolConfigurationArgumentOverride), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineDynamicVectaraToolConfigurationArgumentOverride; + typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineDynamicVectaraToolConfigurationVariant2; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..a27a1820 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2.g.cs @@ -0,0 +1,96 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineDynamicVectaraToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'dynamic_vectara' for generic Vectara tool configurations.
+ /// Default Value: dynamic_vectara + ///
+ /// "dynamic_vectara" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "dynamic_vectara"; + + /// + /// Unique identifier for a tool.
+ /// Example: tol_123e4567-e89b-12d3-a456-426614174000 + ///
+ /// tol_123e4567-e89b-12d3-a456-426614174000 + [global::System.Text.Json.Serialization.JsonPropertyName("tool_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ToolId { get; set; } + + /// + /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// The values can also be dynamic references to context values using $ref with dot notation path syntax:
+ /// - Static value: "fixed_value" or 123
+ /// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
+ /// References are resolved at runtime from context:
+ /// - session.metadata.* - Access session metadata fields
+ /// - agent.metadata.* - Access agent metadata fields
+ /// Example:
+ /// `{"query": {"$ref": ".session.metadata.query"}}`
+ /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
+ /// Example: {"custom_param":"value","limit":10} + ///
+ /// {"custom_param":"value","limit":10} + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public object? ArgumentOverride { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'dynamic_vectara' for generic Vectara tool configurations.
+ /// Default Value: dynamic_vectara + /// + /// + /// Unique identifier for a tool.
+ /// Example: tol_123e4567-e89b-12d3-a456-426614174000 + /// + /// + /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// The values can also be dynamic references to context values using $ref with dot notation path syntax:
+ /// - Static value: "fixed_value" or 123
+ /// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
+ /// References are resolved at runtime from context:
+ /// - session.metadata.* - Access session metadata fields
+ /// - agent.metadata.* - Access agent metadata fields
+ /// Example:
+ /// `{"query": {"$ref": ".session.metadata.query"}}`
+ /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
+ /// Example: {"custom_param":"value","limit":10} + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineDynamicVectaraToolConfigurationVariant2( + string type, + string toolId, + object? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ToolId = toolId ?? throw new global::System.ArgumentNullException(nameof(toolId)); + this.ArgumentOverride = argumentOverride; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineDynamicVectaraToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.Json.g.cs new file mode 100644 index 00000000..7d957f9c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride), + jsonSerializerContext) as global::Vectara.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs similarity index 98% rename from src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationArgumentOverride.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs index ee2a86f2..d2fda9f2 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride.g.cs @@ -16,7 +16,7 @@ namespace Vectara /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
/// Example: {"custom_param":"value","limit":10} ///
- public sealed partial class InlineDynamicVectaraToolConfigurationArgumentOverride + public sealed partial class InlineDynamicVectaraToolConfigurationVariant2ArgumentOverride { /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.Json.g.cs index 0b1934b9..d3681958 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineGetDocumentTextToolConfiguration + public readonly partial struct InlineGetDocumentTextToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineGetDocumentTextToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineGetDocumentTextToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineGetDocumentTextToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineGetDocumentTextToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineGetDocumentTextToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineGetDocumentTextToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs index b193344d..3e9496e7 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,91 +7,215 @@ namespace Vectara /// /// A get document text tool configuration defined inline in the agent for fetching document text content from a corpus. /// - public sealed partial class InlineGetDocumentTextToolConfiguration + public readonly partial struct InlineGetDocumentTextToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'get_document_text' for inline get document text tool configurations.
- /// Default Value: get_document_text + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "get_document_text" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "get_document_text"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// Configurable parameters for the get document text tool. If not overridden, they will be required by the LLM to fill in. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.GetDocumentTextParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? InlineGetDocumentTextToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? InlineGetDocumentTextToolConfigurationVariant2 { get; } +#endif /// - /// User-configurable settings for the get document text tool. These parameters are never exposed to the agent. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("tool_configuration")] - public global::Vectara.GetDocumentTextConfiguration? ToolConfiguration { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineGetDocumentTextToolConfigurationVariant2))] +#endif + public bool IsInlineGetDocumentTextToolConfigurationVariant2 => InlineGetDocumentTextToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineGetDocumentTextToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineGetDocumentTextToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineGetDocumentTextToolConfiguration @this) => @this.AgentBase; /// - /// Initializes a new instance of the class. + /// + /// + public InlineGetDocumentTextToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineGetDocumentTextToolConfiguration(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2 value) => new InlineGetDocumentTextToolConfiguration((global::Vectara.InlineGetDocumentTextToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineGetDocumentTextToolConfigurationVariant2?(InlineGetDocumentTextToolConfiguration @this) => @this.InlineGetDocumentTextToolConfigurationVariant2; + + /// + /// + /// + public InlineGetDocumentTextToolConfiguration(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? value) + { + InlineGetDocumentTextToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'get_document_text' for inline get document text tool configurations.
- /// Default Value: get_document_text - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Configurable parameters for the get document text tool. If not overridden, they will be required by the LLM to fill in. - /// - /// - /// User-configurable settings for the get document text tool. These parameters are never exposed to the agent. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineGetDocumentTextToolConfiguration( - string type, - string? descriptionTemplate, - global::Vectara.GetDocumentTextParameters? argumentOverride, - global::Vectara.GetDocumentTextConfiguration? toolConfiguration) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? inlineGetDocumentTextToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineGetDocumentTextToolConfigurationVariant2 = inlineGetDocumentTextToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineGetDocumentTextToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineGetDocumentTextToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineGetDocumentTextToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineGetDocumentTextToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineGetDocumentTextToolConfigurationVariant2 && inlineGetDocumentTextToolConfigurationVariant2 != null) + { + return inlineGetDocumentTextToolConfigurationVariant2(InlineGetDocumentTextToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineGetDocumentTextToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineGetDocumentTextToolConfigurationVariant2) + { + inlineGetDocumentTextToolConfigurationVariant2?.Invoke(InlineGetDocumentTextToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineGetDocumentTextToolConfigurationVariant2, + typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineGetDocumentTextToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineGetDocumentTextToolConfigurationVariant2, other.InlineGetDocumentTextToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineGetDocumentTextToolConfiguration obj1, InlineGetDocumentTextToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineGetDocumentTextToolConfiguration obj1, InlineGetDocumentTextToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; - this.ToolConfiguration = toolConfiguration; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineGetDocumentTextToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineGetDocumentTextToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..9a165d18 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineGetDocumentTextToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineGetDocumentTextToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineGetDocumentTextToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineGetDocumentTextToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineGetDocumentTextToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..49ae2906 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineGetDocumentTextToolConfigurationVariant2.g.cs @@ -0,0 +1,71 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineGetDocumentTextToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'get_document_text' for inline get document text tool configurations.
+ /// Default Value: get_document_text + ///
+ /// "get_document_text" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "get_document_text"; + + /// + /// Configurable parameters for the get document text tool. If not overridden, they will be required by the LLM to fill in. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.GetDocumentTextParameters? ArgumentOverride { get; set; } + + /// + /// User-configurable settings for the get document text tool. These parameters are never exposed to the agent. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_configuration")] + public global::Vectara.GetDocumentTextConfiguration? ToolConfiguration { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'get_document_text' for inline get document text tool configurations.
+ /// Default Value: get_document_text + /// + /// + /// Configurable parameters for the get document text tool. If not overridden, they will be required by the LLM to fill in. + /// + /// + /// User-configurable settings for the get document text tool. These parameters are never exposed to the agent. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineGetDocumentTextToolConfigurationVariant2( + string type, + global::Vectara.GetDocumentTextParameters? argumentOverride, + global::Vectara.GetDocumentTextConfiguration? toolConfiguration) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + this.ToolConfiguration = toolConfiguration; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineGetDocumentTextToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.Json.g.cs index 599446aa..d38c2f7a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineImageReadToolConfiguration + public readonly partial struct InlineImageReadToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineImageReadToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineImageReadToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineImageReadToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineImageReadToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineImageReadToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineImageReadToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs index e9166caf..bb6af2c5 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,80 +7,215 @@ namespace Vectara /// /// An image read tool configuration defined inline in the agent for loading images into the conversation context. /// - public sealed partial class InlineImageReadToolConfiguration + public readonly partial struct InlineImageReadToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'image_read' for inline image read tool configurations.
- /// Default Value: image_read + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "image_read" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "image_read"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// Configurable parameters for the image read tool. If not overridden, they will be required by the LLM to fill in. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.ImageReadToolParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineImageReadToolConfigurationVariant2? InlineImageReadToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineImageReadToolConfigurationVariant2? InlineImageReadToolConfigurationVariant2 { get; } +#endif /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineImageReadToolConfigurationVariant2))] +#endif + public bool IsInlineImageReadToolConfigurationVariant2 => InlineImageReadToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineImageReadToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineImageReadToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Initializes a new instance of the class. + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineImageReadToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineImageReadToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineImageReadToolConfiguration(global::Vectara.InlineImageReadToolConfigurationVariant2 value) => new InlineImageReadToolConfiguration((global::Vectara.InlineImageReadToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineImageReadToolConfigurationVariant2?(InlineImageReadToolConfiguration @this) => @this.InlineImageReadToolConfigurationVariant2; + + /// + /// + /// + public InlineImageReadToolConfiguration(global::Vectara.InlineImageReadToolConfigurationVariant2? value) + { + InlineImageReadToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'image_read' for inline image read tool configurations.
- /// Default Value: image_read - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Configurable parameters for the image read tool. If not overridden, they will be required by the LLM to fill in. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineImageReadToolConfiguration( - string type, - string? descriptionTemplate, - global::Vectara.ImageReadToolParameters? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineImageReadToolConfigurationVariant2? inlineImageReadToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineImageReadToolConfigurationVariant2 = inlineImageReadToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineImageReadToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineImageReadToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineImageReadToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineImageReadToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineImageReadToolConfigurationVariant2 && inlineImageReadToolConfigurationVariant2 != null) + { + return inlineImageReadToolConfigurationVariant2(InlineImageReadToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineImageReadToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineImageReadToolConfigurationVariant2) + { + inlineImageReadToolConfigurationVariant2?.Invoke(InlineImageReadToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineImageReadToolConfigurationVariant2, + typeof(global::Vectara.InlineImageReadToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineImageReadToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineImageReadToolConfigurationVariant2, other.InlineImageReadToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineImageReadToolConfiguration obj1, InlineImageReadToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineImageReadToolConfiguration obj1, InlineImageReadToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineImageReadToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineImageReadToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..eb783f4b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineImageReadToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineImageReadToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineImageReadToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineImageReadToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineImageReadToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineImageReadToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineImageReadToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..c81f4e06 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineImageReadToolConfigurationVariant2.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineImageReadToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'image_read' for inline image read tool configurations.
+ /// Default Value: image_read + ///
+ /// "image_read" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "image_read"; + + /// + /// Configurable parameters for the image read tool. If not overridden, they will be required by the LLM to fill in. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.ImageReadToolParameters? ArgumentOverride { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'image_read' for inline image read tool configurations.
+ /// Default Value: image_read + /// + /// + /// Configurable parameters for the image read tool. If not overridden, they will be required by the LLM to fill in. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineImageReadToolConfigurationVariant2( + string type, + global::Vectara.ImageReadToolParameters? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineImageReadToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.Json.g.cs index 4ab730d8..e2a63d4e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineLambdaToolConfiguration + public readonly partial struct InlineLambdaToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineLambdaToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineLambdaToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineLambdaToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineLambdaToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineLambdaToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineLambdaToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs index 8bae7ca2..4cba8ca2 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,98 +7,215 @@ namespace Vectara /// /// A lambda tool configuration defined inline in the agent for executing user-defined functions. /// - public sealed partial class InlineLambdaToolConfiguration + public readonly partial struct InlineLambdaToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'lambda' for inline lambda tool configurations.
- /// Default Value: lambda - ///
- /// "lambda" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "lambda"; - - /// - /// Unique identifier for a tool.
- /// Example: tol_123e4567-e89b-12d3-a456-426614174000 - ///
- /// tol_123e4567-e89b-12d3-a456-426614174000 - [global::System.Text.Json.Serialization.JsonPropertyName("tool_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ToolId { get; set; } - - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } - - /// - /// Optional hardcoded arguments that will be passed to the lambda function. When specified, these values will be used instead of allowing the LLM to fill in those parameters.
- /// Example: {"custom_param":"value"} - ///
- /// {"custom_param":"value"} - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public object? ArgumentOverride { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The type of tool configuration, which is always 'lambda' for inline lambda tool configurations.
- /// Default Value: lambda - /// - /// - /// Unique identifier for a tool.
- /// Example: tol_123e4567-e89b-12d3-a456-426614174000 - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Optional hardcoded arguments that will be passed to the lambda function. When specified, these values will be used instead of allowing the LLM to fill in those parameters.
- /// Example: {"custom_param":"value"} - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + /// Base properties shared by all inline tool configurations on an agent. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] #endif + public bool IsAgentBase => AgentBase != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.InlineLambdaToolConfigurationVariant2? InlineLambdaToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineLambdaToolConfigurationVariant2? InlineLambdaToolConfigurationVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineLambdaToolConfigurationVariant2))] +#endif + public bool IsInlineLambdaToolConfigurationVariant2 => InlineLambdaToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineLambdaToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineLambdaToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineLambdaToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineLambdaToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineLambdaToolConfiguration(global::Vectara.InlineLambdaToolConfigurationVariant2 value) => new InlineLambdaToolConfiguration((global::Vectara.InlineLambdaToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineLambdaToolConfigurationVariant2?(InlineLambdaToolConfiguration @this) => @this.InlineLambdaToolConfigurationVariant2; + + /// + /// + /// + public InlineLambdaToolConfiguration(global::Vectara.InlineLambdaToolConfigurationVariant2? value) + { + InlineLambdaToolConfigurationVariant2 = value; + } + + /// + /// + /// public InlineLambdaToolConfiguration( - string type, - string toolId, - string? descriptionTemplate, - object? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineLambdaToolConfigurationVariant2? inlineLambdaToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineLambdaToolConfigurationVariant2 = inlineLambdaToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineLambdaToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineLambdaToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineLambdaToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineLambdaToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineLambdaToolConfigurationVariant2 && inlineLambdaToolConfigurationVariant2 != null) + { + return inlineLambdaToolConfigurationVariant2(InlineLambdaToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineLambdaToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineLambdaToolConfigurationVariant2) + { + inlineLambdaToolConfigurationVariant2?.Invoke(InlineLambdaToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineLambdaToolConfigurationVariant2, + typeof(global::Vectara.InlineLambdaToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineLambdaToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineLambdaToolConfigurationVariant2, other.InlineLambdaToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineLambdaToolConfiguration obj1, InlineLambdaToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineLambdaToolConfiguration obj1, InlineLambdaToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.ToolId = toolId ?? throw new global::System.ArgumentNullException(nameof(toolId)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineLambdaToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineLambdaToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationArgumentOverride.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2.Json.g.cs similarity index 88% rename from src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationArgumentOverride.Json.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2.Json.g.cs index 1953aecf..9e38a760 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationArgumentOverride.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineLambdaToolConfigurationArgumentOverride + public sealed partial class InlineLambdaToolConfigurationVariant2 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Vectara.InlineLambdaToolConfigurationArgumentOverride? FromJson( + public static global::Vectara.InlineLambdaToolConfigurationVariant2? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Vectara.InlineLambdaToolConfigurationArgumentOverride), - jsonSerializerContext) as global::Vectara.InlineLambdaToolConfigurationArgumentOverride; + typeof(global::Vectara.InlineLambdaToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineLambdaToolConfigurationVariant2; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Vectara.InlineLambdaToolConfigurationArgumentOverride? FromJson( + public static global::Vectara.InlineLambdaToolConfigurationVariant2? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Vectara.InlineLambdaToolConfigurationArgumentOverride), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineLambdaToolConfigurationArgumentOverride; + typeof(global::Vectara.InlineLambdaToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineLambdaToolConfigurationVariant2; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..4cc680cc --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2.g.cs @@ -0,0 +1,78 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineLambdaToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'lambda' for inline lambda tool configurations.
+ /// Default Value: lambda + ///
+ /// "lambda" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "lambda"; + + /// + /// Unique identifier for a tool.
+ /// Example: tol_123e4567-e89b-12d3-a456-426614174000 + ///
+ /// tol_123e4567-e89b-12d3-a456-426614174000 + [global::System.Text.Json.Serialization.JsonPropertyName("tool_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ToolId { get; set; } + + /// + /// Optional hardcoded arguments that will be passed to the lambda function. When specified, these values will be used instead of allowing the LLM to fill in those parameters.
+ /// Example: {"custom_param":"value"} + ///
+ /// {"custom_param":"value"} + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public object? ArgumentOverride { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'lambda' for inline lambda tool configurations.
+ /// Default Value: lambda + /// + /// + /// Unique identifier for a tool.
+ /// Example: tol_123e4567-e89b-12d3-a456-426614174000 + /// + /// + /// Optional hardcoded arguments that will be passed to the lambda function. When specified, these values will be used instead of allowing the LLM to fill in those parameters.
+ /// Example: {"custom_param":"value"} + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineLambdaToolConfigurationVariant2( + string type, + string toolId, + object? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ToolId = toolId ?? throw new global::System.ArgumentNullException(nameof(toolId)); + this.ArgumentOverride = argumentOverride; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineLambdaToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2ArgumentOverride.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2ArgumentOverride.Json.g.cs new file mode 100644 index 00000000..0cb84917 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2ArgumentOverride.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineLambdaToolConfigurationVariant2ArgumentOverride + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineLambdaToolConfigurationVariant2ArgumentOverride? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineLambdaToolConfigurationVariant2ArgumentOverride), + jsonSerializerContext) as global::Vectara.InlineLambdaToolConfigurationVariant2ArgumentOverride; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineLambdaToolConfigurationVariant2ArgumentOverride? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineLambdaToolConfigurationVariant2ArgumentOverride), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineLambdaToolConfigurationVariant2ArgumentOverride; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2ArgumentOverride.g.cs similarity index 88% rename from src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationArgumentOverride.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2ArgumentOverride.g.cs index 9a99a47c..92d901ee 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineLambdaToolConfigurationVariant2ArgumentOverride.g.cs @@ -7,7 +7,7 @@ namespace Vectara /// Optional hardcoded arguments that will be passed to the lambda function. When specified, these values will be used instead of allowing the LLM to fill in those parameters.
/// Example: {"custom_param":"value"} ///
- public sealed partial class InlineLambdaToolConfigurationArgumentOverride + public sealed partial class InlineLambdaToolConfigurationVariant2ArgumentOverride { /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.Json.g.cs index 44cc1e4f..d1851bfd 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineMcpToolConfiguration + public readonly partial struct InlineMcpToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineMcpToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineMcpToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineMcpToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineMcpToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineMcpToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineMcpToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs index 6b96a3ea..bf6d7586 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,116 +7,215 @@ namespace Vectara /// /// An MCP tool configuration defined inline in the agent. /// - public sealed partial class InlineMcpToolConfiguration + public readonly partial struct InlineMcpToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'mcp' for inline MCP tool configurations.
- /// Default Value: mcp - ///
- /// "mcp" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "mcp"; - - /// - /// Unique identifier for a tool.
- /// Example: tol_123e4567-e89b-12d3-a456-426614174000 - ///
- /// tol_123e4567-e89b-12d3-a456-426614174000 - [global::System.Text.Json.Serialization.JsonPropertyName("tool_id")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string ToolId { get; set; } - - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } - - /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
- /// The values can also be dynamic references to context values using $ref with dot notation path syntax:
- /// - Static value: "fixed_value" or 123
- /// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
- /// References are resolved at runtime from context:
- /// - session.metadata.* - Access session metadata fields
- /// - agent.metadata.* - Access agent metadata fields
- /// Example:
- /// `{"query": {"$ref": ".session.metadata.query"}}`
- /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
- /// Example: {"custom_param":"value","limit":10} - ///
- /// {"custom_param":"value","limit":10} - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public object? ArgumentOverride { get; set; } - - /// - /// Additional properties that are not explicitly defined in the schema - /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// - /// The type of tool configuration, which is always 'mcp' for inline MCP tool configurations.
- /// Default Value: mcp - /// - /// - /// Unique identifier for a tool.
- /// Example: tol_123e4567-e89b-12d3-a456-426614174000 - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
- /// The values can also be dynamic references to context values using $ref with dot notation path syntax:
- /// - Static value: "fixed_value" or 123
- /// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
- /// References are resolved at runtime from context:
- /// - session.metadata.* - Access session metadata fields
- /// - agent.metadata.* - Access agent metadata fields
- /// Example:
- /// `{"query": {"$ref": ".session.metadata.query"}}`
- /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
- /// Example: {"custom_param":"value","limit":10} - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + /// Base properties shared by all inline tool configurations on an agent. + ///
+#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] #endif + public bool IsAgentBase => AgentBase != null; + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::Vectara.InlineMcpToolConfigurationVariant2? InlineMcpToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineMcpToolConfigurationVariant2? InlineMcpToolConfigurationVariant2 { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineMcpToolConfigurationVariant2))] +#endif + public bool IsInlineMcpToolConfigurationVariant2 => InlineMcpToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineMcpToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineMcpToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); + + /// + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineMcpToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineMcpToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineMcpToolConfiguration(global::Vectara.InlineMcpToolConfigurationVariant2 value) => new InlineMcpToolConfiguration((global::Vectara.InlineMcpToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineMcpToolConfigurationVariant2?(InlineMcpToolConfiguration @this) => @this.InlineMcpToolConfigurationVariant2; + + /// + /// + /// + public InlineMcpToolConfiguration(global::Vectara.InlineMcpToolConfigurationVariant2? value) + { + InlineMcpToolConfigurationVariant2 = value; + } + + /// + /// + /// public InlineMcpToolConfiguration( - string type, - string toolId, - string? descriptionTemplate, - object? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineMcpToolConfigurationVariant2? inlineMcpToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineMcpToolConfigurationVariant2 = inlineMcpToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineMcpToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineMcpToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineMcpToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineMcpToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineMcpToolConfigurationVariant2 && inlineMcpToolConfigurationVariant2 != null) + { + return inlineMcpToolConfigurationVariant2(InlineMcpToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineMcpToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineMcpToolConfigurationVariant2) + { + inlineMcpToolConfigurationVariant2?.Invoke(InlineMcpToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineMcpToolConfigurationVariant2, + typeof(global::Vectara.InlineMcpToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineMcpToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineMcpToolConfigurationVariant2, other.InlineMcpToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineMcpToolConfiguration obj1, InlineMcpToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineMcpToolConfiguration obj1, InlineMcpToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.ToolId = toolId ?? throw new global::System.ArgumentNullException(nameof(toolId)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineMcpToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineMcpToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationArgumentOverride.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.Json.g.cs similarity index 89% rename from src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationArgumentOverride.Json.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.Json.g.cs index 35040335..3f241d22 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationArgumentOverride.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineMcpToolConfigurationArgumentOverride + public sealed partial class InlineMcpToolConfigurationVariant2 { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::Vectara.InlineMcpToolConfigurationArgumentOverride? FromJson( + public static global::Vectara.InlineMcpToolConfigurationVariant2? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::Vectara.InlineMcpToolConfigurationArgumentOverride), - jsonSerializerContext) as global::Vectara.InlineMcpToolConfigurationArgumentOverride; + typeof(global::Vectara.InlineMcpToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineMcpToolConfigurationVariant2; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::Vectara.InlineMcpToolConfigurationArgumentOverride? FromJson( + public static global::Vectara.InlineMcpToolConfigurationVariant2? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::Vectara.InlineMcpToolConfigurationArgumentOverride), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineMcpToolConfigurationArgumentOverride; + typeof(global::Vectara.InlineMcpToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineMcpToolConfigurationVariant2; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..26a08790 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2.g.cs @@ -0,0 +1,96 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineMcpToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'mcp' for inline MCP tool configurations.
+ /// Default Value: mcp + ///
+ /// "mcp" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "mcp"; + + /// + /// Unique identifier for a tool.
+ /// Example: tol_123e4567-e89b-12d3-a456-426614174000 + ///
+ /// tol_123e4567-e89b-12d3-a456-426614174000 + [global::System.Text.Json.Serialization.JsonPropertyName("tool_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ToolId { get; set; } + + /// + /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// The values can also be dynamic references to context values using $ref with dot notation path syntax:
+ /// - Static value: "fixed_value" or 123
+ /// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
+ /// References are resolved at runtime from context:
+ /// - session.metadata.* - Access session metadata fields
+ /// - agent.metadata.* - Access agent metadata fields
+ /// Example:
+ /// `{"query": {"$ref": ".session.metadata.query"}}`
+ /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
+ /// Example: {"custom_param":"value","limit":10} + ///
+ /// {"custom_param":"value","limit":10} + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public object? ArgumentOverride { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'mcp' for inline MCP tool configurations.
+ /// Default Value: mcp + /// + /// + /// Unique identifier for a tool.
+ /// Example: tol_123e4567-e89b-12d3-a456-426614174000 + /// + /// + /// Optional hardcoded arguments for tool calls. The key specifies the location in the tool arguments to overide, and the value specifies what to override with. The LLM will not be able to change the parameters, nor know those values exist within the tool.
+ /// The values can also be dynamic references to context values using $ref with dot notation path syntax:
+ /// - Static value: "fixed_value" or 123
+ /// - Dynamic reference: `{"$ref": "session.metadata.field_name"}`
+ /// References are resolved at runtime from context:
+ /// - session.metadata.* - Access session metadata fields
+ /// - agent.metadata.* - Access agent metadata fields
+ /// Example:
+ /// `{"query": {"$ref": ".session.metadata.query"}}`
+ /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
+ /// Example: {"custom_param":"value","limit":10} + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineMcpToolConfigurationVariant2( + string type, + string toolId, + object? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ToolId = toolId ?? throw new global::System.ArgumentNullException(nameof(toolId)); + this.ArgumentOverride = argumentOverride; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineMcpToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.Json.g.cs new file mode 100644 index 00000000..1a0ebc1b --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineMcpToolConfigurationVariant2ArgumentOverride + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineMcpToolConfigurationVariant2ArgumentOverride? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineMcpToolConfigurationVariant2ArgumentOverride), + jsonSerializerContext) as global::Vectara.InlineMcpToolConfigurationVariant2ArgumentOverride; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineMcpToolConfigurationVariant2ArgumentOverride? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineMcpToolConfigurationVariant2ArgumentOverride), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineMcpToolConfigurationVariant2ArgumentOverride; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationArgumentOverride.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs similarity index 94% rename from src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationArgumentOverride.g.cs rename to src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs index 022b9d87..0e7a6898 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationArgumentOverride.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineMcpToolConfigurationVariant2ArgumentOverride.g.cs @@ -16,7 +16,7 @@ namespace Vectara /// If you want to have a real value `"$ref"` use `"$$ref"`, that is you can escape the first $ by using $$.
/// Example: {"custom_param":"value","limit":10} ///
- public sealed partial class InlineMcpToolConfigurationArgumentOverride + public sealed partial class InlineMcpToolConfigurationVariant2ArgumentOverride { /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.Json.g.cs index 8acdccdf..2cc4f5a7 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineSubAgentToolConfiguration + public readonly partial struct InlineSubAgentToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineSubAgentToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineSubAgentToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineSubAgentToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineSubAgentToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineSubAgentToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineSubAgentToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs index d22a3dd2..25ba63c9 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,92 +7,215 @@ namespace Vectara /// /// A sub-agent tool configuration defined inline in the agent for invoking specialized sub-agents. /// - public sealed partial class InlineSubAgentToolConfiguration + public readonly partial struct InlineSubAgentToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'sub_agent' for inline sub-agent tool configurations.
- /// Default Value: sub_agent + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "sub_agent" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "sub_agent"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? Base { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? Base { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Base))] +#endif + public bool IsBase => Base != null; /// - /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the LLM to fill in. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.SubAgentToolParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineSubAgentToolConfigurationVariant2? InlineSubAgentToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineSubAgentToolConfigurationVariant2? InlineSubAgentToolConfigurationVariant2 { get; } +#endif /// - /// User-configurable settings for the sub-agent tool. These parameters are never exposed to the agent. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("sub_agent_configuration")] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Vectara.SubAgentConfiguration SubAgentConfiguration { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineSubAgentToolConfigurationVariant2))] +#endif + public bool IsInlineSubAgentToolConfigurationVariant2 => InlineSubAgentToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineSubAgentToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineSubAgentToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineSubAgentToolConfiguration @this) => @this.Base; /// - /// Initializes a new instance of the class. + /// + /// + public InlineSubAgentToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + Base = value; + } + + /// + /// + /// + public static implicit operator InlineSubAgentToolConfiguration(global::Vectara.InlineSubAgentToolConfigurationVariant2 value) => new InlineSubAgentToolConfiguration((global::Vectara.InlineSubAgentToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineSubAgentToolConfigurationVariant2?(InlineSubAgentToolConfiguration @this) => @this.InlineSubAgentToolConfigurationVariant2; + + /// + /// + /// + public InlineSubAgentToolConfiguration(global::Vectara.InlineSubAgentToolConfigurationVariant2? value) + { + InlineSubAgentToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'sub_agent' for inline sub-agent tool configurations.
- /// Default Value: sub_agent - /// - /// - /// User-configurable settings for the sub-agent tool. These parameters are never exposed to the agent. - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the LLM to fill in. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineSubAgentToolConfiguration( - string type, - global::Vectara.SubAgentConfiguration subAgentConfiguration, - string? descriptionTemplate, - global::Vectara.SubAgentToolParameters? argumentOverride) + global::Vectara.AgentToolConfigurationBase? @base, + global::Vectara.InlineSubAgentToolConfigurationVariant2? inlineSubAgentToolConfigurationVariant2 + ) + { + Base = @base; + InlineSubAgentToolConfigurationVariant2 = inlineSubAgentToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineSubAgentToolConfigurationVariant2 as object ?? + Base as object + ; + + /// + /// + /// + public override string? ToString() => + Base?.ToString() ?? + InlineSubAgentToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsBase && IsInlineSubAgentToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? @base = null, + global::System.Func? inlineSubAgentToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase && @base != null) + { + return @base(Base!); + } + else if (IsInlineSubAgentToolConfigurationVariant2 && inlineSubAgentToolConfigurationVariant2 != null) + { + return inlineSubAgentToolConfigurationVariant2(InlineSubAgentToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? @base = null, + global::System.Action? inlineSubAgentToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsBase) + { + @base?.Invoke(Base!); + } + else if (IsInlineSubAgentToolConfigurationVariant2) + { + inlineSubAgentToolConfigurationVariant2?.Invoke(InlineSubAgentToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Base, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineSubAgentToolConfigurationVariant2, + typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineSubAgentToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Base, other.Base) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineSubAgentToolConfigurationVariant2, other.InlineSubAgentToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineSubAgentToolConfiguration obj1, InlineSubAgentToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineSubAgentToolConfiguration obj1, InlineSubAgentToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; - this.SubAgentConfiguration = subAgentConfiguration ?? throw new global::System.ArgumentNullException(nameof(subAgentConfiguration)); + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineSubAgentToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineSubAgentToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..86e84a8c --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineSubAgentToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineSubAgentToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineSubAgentToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineSubAgentToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineSubAgentToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineSubAgentToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..8909c039 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineSubAgentToolConfigurationVariant2.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineSubAgentToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'sub_agent' for inline sub-agent tool configurations.
+ /// Default Value: sub_agent + ///
+ /// "sub_agent" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "sub_agent"; + + /// + /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the LLM to fill in. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.SubAgentToolParameters? ArgumentOverride { get; set; } + + /// + /// User-configurable settings for the sub-agent tool. These parameters are never exposed to the agent. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sub_agent_configuration")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Vectara.SubAgentConfiguration SubAgentConfiguration { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'sub_agent' for inline sub-agent tool configurations.
+ /// Default Value: sub_agent + /// + /// + /// User-configurable settings for the sub-agent tool. These parameters are never exposed to the agent. + /// + /// + /// Configurable parameters for the sub-agent tool. If not overridden, they will be required by the LLM to fill in. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineSubAgentToolConfigurationVariant2( + string type, + global::Vectara.SubAgentConfiguration subAgentConfiguration, + global::Vectara.SubAgentToolParameters? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + this.SubAgentConfiguration = subAgentConfiguration ?? throw new global::System.ArgumentNullException(nameof(subAgentConfiguration)); + } + + /// + /// Initializes a new instance of the class. + /// + public InlineSubAgentToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.Json.g.cs index c47e8034..2f29bc66 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineWebGetToolConfiguration + public readonly partial struct InlineWebGetToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineWebGetToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineWebGetToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineWebGetToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineWebGetToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineWebGetToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineWebGetToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs index 1ff2a96d..b8ec4eee 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,80 +7,215 @@ namespace Vectara /// /// A web get tool configuration defined inline in the agent for fetching content from URLs. /// - public sealed partial class InlineWebGetToolConfiguration + public readonly partial struct InlineWebGetToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'web_get' for inline web get tool configurations.
- /// Default Value: web_get + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "web_get" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "web_get"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// Configurable parameters for the web get tool. If not provided, will be filled in by the agent. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.WebGetToolParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineWebGetToolConfigurationVariant2? InlineWebGetToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineWebGetToolConfigurationVariant2? InlineWebGetToolConfigurationVariant2 { get; } +#endif /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineWebGetToolConfigurationVariant2))] +#endif + public bool IsInlineWebGetToolConfigurationVariant2 => InlineWebGetToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineWebGetToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineWebGetToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Initializes a new instance of the class. + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineWebGetToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineWebGetToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineWebGetToolConfiguration(global::Vectara.InlineWebGetToolConfigurationVariant2 value) => new InlineWebGetToolConfiguration((global::Vectara.InlineWebGetToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineWebGetToolConfigurationVariant2?(InlineWebGetToolConfiguration @this) => @this.InlineWebGetToolConfigurationVariant2; + + /// + /// + /// + public InlineWebGetToolConfiguration(global::Vectara.InlineWebGetToolConfigurationVariant2? value) + { + InlineWebGetToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'web_get' for inline web get tool configurations.
- /// Default Value: web_get - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Configurable parameters for the web get tool. If not provided, will be filled in by the agent. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineWebGetToolConfiguration( - string type, - string? descriptionTemplate, - global::Vectara.WebGetToolParameters? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineWebGetToolConfigurationVariant2? inlineWebGetToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineWebGetToolConfigurationVariant2 = inlineWebGetToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineWebGetToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineWebGetToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineWebGetToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineWebGetToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineWebGetToolConfigurationVariant2 && inlineWebGetToolConfigurationVariant2 != null) + { + return inlineWebGetToolConfigurationVariant2(InlineWebGetToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineWebGetToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineWebGetToolConfigurationVariant2) + { + inlineWebGetToolConfigurationVariant2?.Invoke(InlineWebGetToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineWebGetToolConfigurationVariant2, + typeof(global::Vectara.InlineWebGetToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineWebGetToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineWebGetToolConfigurationVariant2, other.InlineWebGetToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineWebGetToolConfiguration obj1, InlineWebGetToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineWebGetToolConfiguration obj1, InlineWebGetToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineWebGetToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineWebGetToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..8c7d2ba1 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineWebGetToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineWebGetToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineWebGetToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineWebGetToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineWebGetToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineWebGetToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineWebGetToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..8e68f72e --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebGetToolConfigurationVariant2.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineWebGetToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'web_get' for inline web get tool configurations.
+ /// Default Value: web_get + ///
+ /// "web_get" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "web_get"; + + /// + /// Configurable parameters for the web get tool. If not provided, will be filled in by the agent. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.WebGetToolParameters? ArgumentOverride { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'web_get' for inline web get tool configurations.
+ /// Default Value: web_get + /// + /// + /// Configurable parameters for the web get tool. If not provided, will be filled in by the agent. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineWebGetToolConfigurationVariant2( + string type, + global::Vectara.WebGetToolParameters? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineWebGetToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.Json.g.cs index 0a3de9b4..72dbcc74 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.Json.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.Json.g.cs @@ -2,7 +2,7 @@ namespace Vectara { - public sealed partial class InlineWebSearchToolConfiguration + public readonly partial struct InlineWebSearchToolConfiguration { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -41,7 +41,7 @@ public string ToJson( return global::System.Text.Json.JsonSerializer.Deserialize( json, typeof(global::Vectara.InlineWebSearchToolConfiguration), - jsonSerializerContext) as global::Vectara.InlineWebSearchToolConfiguration; + jsonSerializerContext) as global::Vectara.InlineWebSearchToolConfiguration?; } /// @@ -70,7 +70,7 @@ public string ToJson( return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, typeof(global::Vectara.InlineWebSearchToolConfiguration), - jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineWebSearchToolConfiguration; + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineWebSearchToolConfiguration?; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs index 2487fe73..c1a53c3e 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfiguration.g.cs @@ -1,3 +1,4 @@ +#pragma warning disable CS0618 // Type or member is obsolete #nullable enable @@ -6,80 +7,215 @@ namespace Vectara /// /// A web search tool configuration defined inline in the agent. /// - public sealed partial class InlineWebSearchToolConfiguration + public readonly partial struct InlineWebSearchToolConfiguration : global::System.IEquatable { /// - /// The type of tool configuration, which is always 'web_search' for inline web search tool configurations.
- /// Default Value: web_search + /// Base properties shared by all inline tool configurations on an agent. ///
- /// "web_search" - [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } = "web_search"; +#if NET6_0_OR_GREATER + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; init; } +#else + public global::Vectara.AgentToolConfigurationBase? AgentBase { get; } +#endif /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" + /// ///
- [global::System.Text.Json.Serialization.JsonPropertyName("description_template")] - public string? DescriptionTemplate { get; set; } +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentBase))] +#endif + public bool IsAgentBase => AgentBase != null; /// - /// Configurable parameters for the web search tool. If not provided, will be filled in by the agent. + /// /// - [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] - public global::Vectara.WebSearchToolParameters? ArgumentOverride { get; set; } +#if NET6_0_OR_GREATER + public global::Vectara.InlineWebSearchToolConfigurationVariant2? InlineWebSearchToolConfigurationVariant2 { get; init; } +#else + public global::Vectara.InlineWebSearchToolConfigurationVariant2? InlineWebSearchToolConfigurationVariant2 { get; } +#endif /// - /// Additional properties that are not explicitly defined in the schema + /// /// - [global::System.Text.Json.Serialization.JsonExtensionData] - public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InlineWebSearchToolConfigurationVariant2))] +#endif + public bool IsInlineWebSearchToolConfigurationVariant2 => InlineWebSearchToolConfigurationVariant2 != null; + /// + /// + /// + public static implicit operator InlineWebSearchToolConfiguration(global::Vectara.AgentToolConfigurationBase value) => new InlineWebSearchToolConfiguration((global::Vectara.AgentToolConfigurationBase?)value); /// - /// Initializes a new instance of the class. + /// + /// + public static implicit operator global::Vectara.AgentToolConfigurationBase?(InlineWebSearchToolConfiguration @this) => @this.AgentBase; + + /// + /// + /// + public InlineWebSearchToolConfiguration(global::Vectara.AgentToolConfigurationBase? value) + { + AgentBase = value; + } + + /// + /// + /// + public static implicit operator InlineWebSearchToolConfiguration(global::Vectara.InlineWebSearchToolConfigurationVariant2 value) => new InlineWebSearchToolConfiguration((global::Vectara.InlineWebSearchToolConfigurationVariant2?)value); + + /// + /// + /// + public static implicit operator global::Vectara.InlineWebSearchToolConfigurationVariant2?(InlineWebSearchToolConfiguration @this) => @this.InlineWebSearchToolConfigurationVariant2; + + /// + /// + /// + public InlineWebSearchToolConfiguration(global::Vectara.InlineWebSearchToolConfigurationVariant2? value) + { + InlineWebSearchToolConfigurationVariant2 = value; + } + + /// + /// /// - /// - /// The type of tool configuration, which is always 'web_search' for inline web search tool configurations.
- /// Default Value: web_search - /// - /// - /// Velocity template for generating dynamic tool descriptions. When set, this template is rendered at runtime to produce the tool description.
- /// Available Velocity variables:
- /// - `$agent.name` - Agent name
- /// - `$agent.metadata` - Agent metadata map
- /// - `$session.key` - Session key
- /// - `$session.metadata` - Session metadata map
- /// - `$currentDate` - Current date/time in ISO 8601 format (e.g., "2025-10-24T15:30:45Z")
- /// Example: "Search tool configured for agent $agent.name on $currentDate" - /// - /// - /// Configurable parameters for the web search tool. If not provided, will be filled in by the agent. - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif public InlineWebSearchToolConfiguration( - string type, - string? descriptionTemplate, - global::Vectara.WebSearchToolParameters? argumentOverride) + global::Vectara.AgentToolConfigurationBase? agentBase, + global::Vectara.InlineWebSearchToolConfigurationVariant2? inlineWebSearchToolConfigurationVariant2 + ) + { + AgentBase = agentBase; + InlineWebSearchToolConfigurationVariant2 = inlineWebSearchToolConfigurationVariant2; + } + + /// + /// + /// + public object? Object => + InlineWebSearchToolConfigurationVariant2 as object ?? + AgentBase as object + ; + + /// + /// + /// + public override string? ToString() => + AgentBase?.ToString() ?? + InlineWebSearchToolConfigurationVariant2?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsAgentBase && IsInlineWebSearchToolConfigurationVariant2; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? agentBase = null, + global::System.Func? inlineWebSearchToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase && agentBase != null) + { + return agentBase(AgentBase!); + } + else if (IsInlineWebSearchToolConfigurationVariant2 && inlineWebSearchToolConfigurationVariant2 != null) + { + return inlineWebSearchToolConfigurationVariant2(InlineWebSearchToolConfigurationVariant2!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? agentBase = null, + global::System.Action? inlineWebSearchToolConfigurationVariant2 = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsAgentBase) + { + agentBase?.Invoke(AgentBase!); + } + else if (IsInlineWebSearchToolConfigurationVariant2) + { + inlineWebSearchToolConfigurationVariant2?.Invoke(InlineWebSearchToolConfigurationVariant2!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + AgentBase, + typeof(global::Vectara.AgentToolConfigurationBase), + InlineWebSearchToolConfigurationVariant2, + typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(InlineWebSearchToolConfiguration other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentBase, other.AgentBase) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(InlineWebSearchToolConfigurationVariant2, other.InlineWebSearchToolConfigurationVariant2) + ; + } + + /// + /// + /// + public static bool operator ==(InlineWebSearchToolConfiguration obj1, InlineWebSearchToolConfiguration obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(InlineWebSearchToolConfiguration obj1, InlineWebSearchToolConfiguration obj2) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); - this.DescriptionTemplate = descriptionTemplate; - this.ArgumentOverride = argumentOverride; + return !(obj1 == obj2); } /// - /// Initializes a new instance of the class. + /// /// - public InlineWebSearchToolConfiguration() + public override bool Equals(object? obj) { + return obj is InlineWebSearchToolConfiguration o && Equals(o); } } -} \ No newline at end of file +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfigurationVariant2.Json.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfigurationVariant2.Json.g.cs new file mode 100644 index 00000000..69e13204 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfigurationVariant2.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Vectara +{ + public sealed partial class InlineWebSearchToolConfigurationVariant2 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Vectara.InlineWebSearchToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2), + jsonSerializerContext) as global::Vectara.InlineWebSearchToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Vectara.InlineWebSearchToolConfigurationVariant2? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Vectara.InlineWebSearchToolConfigurationVariant2), + jsonSerializerContext).ConfigureAwait(false)) as global::Vectara.InlineWebSearchToolConfigurationVariant2; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfigurationVariant2.g.cs b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfigurationVariant2.g.cs new file mode 100644 index 00000000..e8bfaf9d --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.InlineWebSearchToolConfigurationVariant2.g.cs @@ -0,0 +1,60 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// + /// + public sealed partial class InlineWebSearchToolConfigurationVariant2 + { + /// + /// The type of tool configuration, which is always 'web_search' for inline web search tool configurations.
+ /// Default Value: web_search + ///
+ /// "web_search" + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } = "web_search"; + + /// + /// Configurable parameters for the web search tool. If not provided, will be filled in by the agent. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("argument_override")] + public global::Vectara.WebSearchToolParameters? ArgumentOverride { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The type of tool configuration, which is always 'web_search' for inline web search tool configurations.
+ /// Default Value: web_search + /// + /// + /// Configurable parameters for the web search tool. If not provided, will be filled in by the agent. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InlineWebSearchToolConfigurationVariant2( + string type, + global::Vectara.WebSearchToolParameters? argumentOverride) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.ArgumentOverride = argumentOverride; + } + + /// + /// Initializes a new instance of the class. + /// + public InlineWebSearchToolConfigurationVariant2() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.LLMCapabilities.g.cs b/src/libs/Vectara/Generated/Vectara.Models.LLMCapabilities.g.cs index d3e61ec2..440449a6 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.LLMCapabilities.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.LLMCapabilities.g.cs @@ -4,7 +4,7 @@ namespace Vectara { /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// public sealed partial class LLMCapabilities { diff --git a/src/libs/Vectara/Generated/Vectara.Models.Llm.g.cs b/src/libs/Vectara/Generated/Vectara.Models.Llm.g.cs index 82c3e69a..3c533088 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.Llm.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.Llm.g.cs @@ -47,7 +47,7 @@ public sealed partial class Llm public bool? Default { get; set; } /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// [global::System.Text.Json.Serialization.JsonPropertyName("capabilities")] public global::Vectara.LLMCapabilities? Capabilities { get; set; } @@ -96,7 +96,7 @@ public sealed partial class Llm /// If this is the default LLM, it is used in queries when the generator is not specified. /// /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// /// /// Indicates whether the LLM is provided by the platform or created by the customer. Platform LLMs are pre-configured and cannot be modified or deleted. Customer LLMs are created and managed by the customer.
diff --git a/src/libs/Vectara/Generated/Vectara.Models.OpenAILLMRequestBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.OpenAILLMRequestBase.g.cs index 9d83aab4..9bd02eef 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.OpenAILLMRequestBase.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.OpenAILLMRequestBase.g.cs @@ -55,6 +55,14 @@ public sealed partial class OpenAILLMRequestBase [global::System.Text.Json.Serialization.JsonPropertyName("headers")] public global::System.Collections.Generic.Dictionary? Headers { get; set; } + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + ///
+ /// 300 + [global::System.Text.Json.Serialization.JsonPropertyName("idle_timeout_seconds")] + public int? IdleTimeoutSeconds { get; set; } + /// /// Any additional parameters that are required for the LLM during the test call.
/// Example: {"max_tokens":512} @@ -64,7 +72,7 @@ public sealed partial class OpenAILLMRequestBase public object? TestModelParameters { get; set; } /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// [global::System.Text.Json.Serialization.JsonPropertyName("capabilities")] public global::Vectara.LLMCapabilities? Capabilities { get; set; } @@ -100,12 +108,16 @@ public sealed partial class OpenAILLMRequestBase /// /// Additional HTTP headers to include with requests to the LLM API. /// + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + /// /// /// Any additional parameters that are required for the LLM during the test call.
/// Example: {"max_tokens":512} /// /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -117,6 +129,7 @@ public OpenAILLMRequestBase( string? model, global::Vectara.RemoteAuth? auth, global::System.Collections.Generic.Dictionary? headers, + int? idleTimeoutSeconds, object? testModelParameters, global::Vectara.LLMCapabilities? capabilities) { @@ -126,6 +139,7 @@ public OpenAILLMRequestBase( this.Uri = uri ?? throw new global::System.ArgumentNullException(nameof(uri)); this.Auth = auth; this.Headers = headers; + this.IdleTimeoutSeconds = idleTimeoutSeconds; this.TestModelParameters = testModelParameters; this.Capabilities = capabilities; } diff --git a/src/libs/Vectara/Generated/Vectara.Models.OpenAILLMUpdateBase.g.cs b/src/libs/Vectara/Generated/Vectara.Models.OpenAILLMUpdateBase.g.cs index cc4b0719..4121a0a8 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.OpenAILLMUpdateBase.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.OpenAILLMUpdateBase.g.cs @@ -39,6 +39,14 @@ public sealed partial class OpenAILLMUpdateBase [global::System.Text.Json.Serialization.JsonPropertyName("headers")] public global::System.Collections.Generic.Dictionary? Headers { get; set; } + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + ///
+ /// 300 + [global::System.Text.Json.Serialization.JsonPropertyName("idle_timeout_seconds")] + public int? IdleTimeoutSeconds { get; set; } + /// /// Whether the LLM is enabled. /// @@ -54,7 +62,7 @@ public sealed partial class OpenAILLMUpdateBase public object? TestModelParameters { get; set; } /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// [global::System.Text.Json.Serialization.JsonPropertyName("capabilities")] public global::Vectara.LLMCapabilities? Capabilities { get; set; } @@ -83,6 +91,10 @@ public sealed partial class OpenAILLMUpdateBase /// /// Additional HTTP headers to include with requests to the LLM API. /// + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + /// /// /// Whether the LLM is enabled. /// @@ -91,7 +103,7 @@ public sealed partial class OpenAILLMUpdateBase /// Example: {"max_tokens":512} /// /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -102,6 +114,7 @@ public OpenAILLMUpdateBase( string? description, global::Vectara.RemoteAuth? auth, global::System.Collections.Generic.Dictionary? headers, + int? idleTimeoutSeconds, bool? enabled, object? testModelParameters, global::Vectara.LLMCapabilities? capabilities) @@ -111,6 +124,7 @@ public OpenAILLMUpdateBase( this.Description = description; this.Auth = auth; this.Headers = headers; + this.IdleTimeoutSeconds = idleTimeoutSeconds; this.Enabled = enabled; this.TestModelParameters = testModelParameters; this.Capabilities = capabilities; diff --git a/src/libs/Vectara/Generated/Vectara.Models.PipelineDeadLetterEntry.g.cs b/src/libs/Vectara/Generated/Vectara.Models.PipelineDeadLetterEntry.g.cs index 11b9a656..01384bb0 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.PipelineDeadLetterEntry.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.PipelineDeadLetterEntry.g.cs @@ -44,7 +44,7 @@ public sealed partial class PipelineDeadLetterEntry public string? ErrorMessage { get; set; } /// - /// The ID of the pipeline run that most recently processed (or failed) this record. + /// The ID of the run that most recently attempted this record. /// [global::System.Text.Json.Serialization.JsonPropertyName("last_run_id")] public string? LastRunId { get; set; } @@ -107,7 +107,7 @@ public sealed partial class PipelineDeadLetterEntry /// The error message from the most recent failed processing attempt. /// /// - /// The ID of the pipeline run that most recently processed (or failed) this record. + /// The ID of the run that most recently attempted this record. /// /// /// When this dead letter was last updated. diff --git a/src/libs/Vectara/Generated/Vectara.Models.ProcessPipelineDeadLetterEntriesRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ProcessPipelineDeadLetterEntriesRequest.g.cs index b9effb57..cfb56211 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ProcessPipelineDeadLetterEntriesRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ProcessPipelineDeadLetterEntriesRequest.g.cs @@ -16,7 +16,7 @@ public sealed partial class ProcessPipelineDeadLetterEntriesRequest public global::System.Collections.Generic.IList? SourceRecordIds { get; set; } /// - /// Only process dead letters from this specific run. + /// Only process dead letters whose `last_run_id` matches this value. /// [global::System.Text.Json.Serialization.JsonPropertyName("last_run_id")] public string? LastRunId { get; set; } @@ -41,7 +41,7 @@ public sealed partial class ProcessPipelineDeadLetterEntriesRequest /// Specific source record IDs to process. If omitted, processes all matching dead letters. /// /// - /// Only process dead letters from this specific run. + /// Only process dead letters whose `last_run_id` matches this value. /// /// /// How this dead letter was created. diff --git a/src/libs/Vectara/Generated/Vectara.Models.TemplatedReminder.g.cs b/src/libs/Vectara/Generated/Vectara.Models.TemplatedReminder.g.cs index fb7557f9..533287bb 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.TemplatedReminder.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.TemplatedReminder.g.cs @@ -56,6 +56,30 @@ public sealed partial class TemplatedReminder [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Collections.Generic.IList Hooks { get; set; } + /// + /// Fire this reminder on every Nth matching hook event (counted independently per hook). Defaults to 1, which preserves the legacy
+ /// behavior of firing on every matching event. Must be at least 1.
+ /// Counters reset after a session compaction: the post-compaction event stream is treated as a fresh sequence (index 0), so
+ /// `skip_first` warmup applies again from the first new matching event.
+ /// Default Value: 1
+ /// Example: 3 + ///
+ /// 3 + [global::System.Text.Json.Serialization.JsonPropertyName("fire_every")] + public int? FireEvery { get; set; } + + /// + /// Skip the first N matching hook events at session start before firing this reminder for the first time (counted independently per hook).
+ /// Defaults to 0, meaning no warmup delay. Must be non-negative.
+ /// Counters reset after a session compaction: the post-compaction event stream is treated as a fresh sequence (index 0), so
+ /// the warmup applies again from the first new matching event.
+ /// Default Value: 0
+ /// Example: 2 + ///
+ /// 2 + [global::System.Text.Json.Serialization.JsonPropertyName("skip_first")] + public int? SkipFirst { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -92,6 +116,22 @@ public sealed partial class TemplatedReminder /// Default Value: velocity
/// Example: velocity /// + /// + /// Fire this reminder on every Nth matching hook event (counted independently per hook). Defaults to 1, which preserves the legacy
+ /// behavior of firing on every matching event. Must be at least 1.
+ /// Counters reset after a session compaction: the post-compaction event stream is treated as a fresh sequence (index 0), so
+ /// `skip_first` warmup applies again from the first new matching event.
+ /// Default Value: 1
+ /// Example: 3 + /// + /// + /// Skip the first N matching hook events at session start before firing this reminder for the first time (counted independently per hook).
+ /// Defaults to 0, meaning no warmup delay. Must be non-negative.
+ /// Counters reset after a session compaction: the post-compaction event stream is treated as a fresh sequence (index 0), so
+ /// the warmup applies again from the first new matching event.
+ /// Default Value: 0
+ /// Example: 2 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -99,12 +139,16 @@ public TemplatedReminder( string type, string template, global::System.Collections.Generic.IList hooks, - global::Vectara.TemplateType? templateType) + global::Vectara.TemplateType? templateType, + int? fireEvery, + int? skipFirst) { this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.TemplateType = templateType; this.Template = template ?? throw new global::System.ArgumentNullException(nameof(template)); this.Hooks = hooks ?? throw new global::System.ArgumentNullException(nameof(hooks)); + this.FireEvery = fireEvery; + this.SkipFirst = skipFirst; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolOutputOffloadingConfiguration.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolOutputOffloadingConfiguration.g.cs index 4a994cb2..f98e1d5a 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.ToolOutputOffloadingConfiguration.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolOutputOffloadingConfiguration.g.cs @@ -4,17 +4,22 @@ namespace Vectara { /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. ///
public sealed partial class ToolOutputOffloadingConfiguration { /// - /// Whether tool output offloading is enabled. If not specified, defaults to true
- /// when the agent has artifact_read configured, false otherwise.
+ /// Whether tool output offloading is active. Defaults to true. When disabled, tool
+ /// outputs are always passed through to the agent verbatim.
/// Example: true ///
/// true @@ -22,39 +27,76 @@ public sealed partial class ToolOutputOffloadingConfiguration public bool? Enabled { get; set; } /// - /// Percentage of the model's context window to use as the offloading threshold,
- /// estimated at 4 characters per token. This is a rough heuristic that varies
- /// across LLMs. The resulting byte threshold is clamped between min_threshold_bytes
- /// and max_threshold_bytes, so this percentage only has an effect when it produces
- /// a value lower than max_threshold_bytes.
- /// Default Value: 0.05
- /// Example: 0.05 + /// How a large tool output is handled once it has been selected for offloading.
+ /// In `artifact` mode, the full output is stored as a session artifact and replaced in
+ /// the conversation with a compact reference containing the artifact id, size, shape,
+ /// and hints for the available artifact tools. The agent can then use artifact_read,
+ /// artifact_grep, or artifact_jq to retrieve just the parts it needs.
+ /// In `truncate` mode, the output is shortened in place to fit within the target size.
+ /// The head and tail are preserved and the middle is replaced with a short notice
+ /// explaining that content was omitted. No artifact is created.
+ /// When unset, the default is `artifact` if the agent has any of artifact_read,
+ /// artifact_grep, or artifact_jq configured, and `truncate` otherwise.
+ /// Example: artifact ///
- /// 0.05 + /// artifact + [global::System.Text.Json.Serialization.JsonPropertyName("mode")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.ToolOutputOffloadingConfigurationModeJsonConverter))] + public global::Vectara.ToolOutputOffloadingConfigurationMode? Mode { get; set; } + + /// + /// The fraction of the model's context window that a single tool output is allowed to
+ /// occupy before it is considered large enough to offload on its own, estimated at four
+ /// characters per token. The resulting byte threshold is clamped between
+ /// `min_threshold_bytes` and `max_threshold_bytes`, so for very large context models
+ /// this percentage is usually dominated by `max_threshold_bytes`, and for very small
+ /// context models it is dominated by `min_threshold_bytes`.
+ /// Default Value: 0.25
+ /// Example: 0.25 + ///
+ /// 0.25 [global::System.Text.Json.Serialization.JsonPropertyName("context_percentage")] public double? ContextPercentage { get; set; } /// - /// Tool outputs above this size (in bytes) will always be offloaded. Acts as a
- /// ceiling on the context_percentage-derived threshold. For large-context models,
- /// max_threshold_bytes is typically the effective threshold since the
- /// context_percentage calculation exceeds it.
- /// Example: 32768 + /// An absolute ceiling on single-output size. Any output above this many bytes is
+ /// considered large enough to offload on its own, regardless of the model's context
+ /// window. This prevents unusually large outputs from slipping through on models with
+ /// very large context windows.
+ /// Example: 1048576 ///
- /// 32768 + /// 1048576 [global::System.Text.Json.Serialization.JsonPropertyName("max_threshold_bytes")] public long? MaxThresholdBytes { get; set; } /// - /// Tool outputs below this size (in bytes) will never be offloaded. Acts as a
- /// floor on the context_percentage-derived threshold, ensuring small outputs are
- /// never offloaded even for models with small context windows.
+ /// A hard floor on offloading. Tool outputs below this size are always passed through
+ /// to the agent unchanged, even when cumulative context usage is high. This ensures that
+ /// short, useful outputs are never unnecessarily truncated or replaced with a reference.
/// Example: 4096 ///
/// 4096 [global::System.Text.Json.Serialization.JsonPropertyName("min_threshold_bytes")] public long? MinThresholdBytes { get; set; } + /// + /// The fraction of the model's context window at which offloading becomes sensitive to
+ /// cumulative usage. When adding a tool output would push total input tokens above this
+ /// fraction of the context window (estimated at four characters per token), the output
+ /// is offloaded even if it would otherwise be considered small enough to pass through.
+ /// This is independent of the compaction `threshold_percent`: both can be configured on
+ /// the same agent and both can apply. In practice it is often useful to set this below
+ /// the compaction threshold so that large tool outputs are offloaded before compaction
+ /// is triggered, avoiding the case where a large tool result is immediately summarized
+ /// away. Setting this to 1.0 effectively disables the headroom behavior, leaving only
+ /// the per-output size thresholds in effect.
+ /// Default Value: 0.7
+ /// Example: 0.7 + ///
+ /// 0.7 + [global::System.Text.Json.Serialization.JsonPropertyName("headroom_percentage")] + public double? HeadroomPercentage { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -65,45 +107,77 @@ public sealed partial class ToolOutputOffloadingConfiguration /// Initializes a new instance of the class. ///
/// - /// Whether tool output offloading is enabled. If not specified, defaults to true
- /// when the agent has artifact_read configured, false otherwise.
+ /// Whether tool output offloading is active. Defaults to true. When disabled, tool
+ /// outputs are always passed through to the agent verbatim.
/// Example: true /// + /// + /// How a large tool output is handled once it has been selected for offloading.
+ /// In `artifact` mode, the full output is stored as a session artifact and replaced in
+ /// the conversation with a compact reference containing the artifact id, size, shape,
+ /// and hints for the available artifact tools. The agent can then use artifact_read,
+ /// artifact_grep, or artifact_jq to retrieve just the parts it needs.
+ /// In `truncate` mode, the output is shortened in place to fit within the target size.
+ /// The head and tail are preserved and the middle is replaced with a short notice
+ /// explaining that content was omitted. No artifact is created.
+ /// When unset, the default is `artifact` if the agent has any of artifact_read,
+ /// artifact_grep, or artifact_jq configured, and `truncate` otherwise.
+ /// Example: artifact + /// /// - /// Percentage of the model's context window to use as the offloading threshold,
- /// estimated at 4 characters per token. This is a rough heuristic that varies
- /// across LLMs. The resulting byte threshold is clamped between min_threshold_bytes
- /// and max_threshold_bytes, so this percentage only has an effect when it produces
- /// a value lower than max_threshold_bytes.
- /// Default Value: 0.05
- /// Example: 0.05 + /// The fraction of the model's context window that a single tool output is allowed to
+ /// occupy before it is considered large enough to offload on its own, estimated at four
+ /// characters per token. The resulting byte threshold is clamped between
+ /// `min_threshold_bytes` and `max_threshold_bytes`, so for very large context models
+ /// this percentage is usually dominated by `max_threshold_bytes`, and for very small
+ /// context models it is dominated by `min_threshold_bytes`.
+ /// Default Value: 0.25
+ /// Example: 0.25 /// /// - /// Tool outputs above this size (in bytes) will always be offloaded. Acts as a
- /// ceiling on the context_percentage-derived threshold. For large-context models,
- /// max_threshold_bytes is typically the effective threshold since the
- /// context_percentage calculation exceeds it.
- /// Example: 32768 + /// An absolute ceiling on single-output size. Any output above this many bytes is
+ /// considered large enough to offload on its own, regardless of the model's context
+ /// window. This prevents unusually large outputs from slipping through on models with
+ /// very large context windows.
+ /// Example: 1048576 /// /// - /// Tool outputs below this size (in bytes) will never be offloaded. Acts as a
- /// floor on the context_percentage-derived threshold, ensuring small outputs are
- /// never offloaded even for models with small context windows.
+ /// A hard floor on offloading. Tool outputs below this size are always passed through
+ /// to the agent unchanged, even when cumulative context usage is high. This ensures that
+ /// short, useful outputs are never unnecessarily truncated or replaced with a reference.
/// Example: 4096 /// + /// + /// The fraction of the model's context window at which offloading becomes sensitive to
+ /// cumulative usage. When adding a tool output would push total input tokens above this
+ /// fraction of the context window (estimated at four characters per token), the output
+ /// is offloaded even if it would otherwise be considered small enough to pass through.
+ /// This is independent of the compaction `threshold_percent`: both can be configured on
+ /// the same agent and both can apply. In practice it is often useful to set this below
+ /// the compaction threshold so that large tool outputs are offloaded before compaction
+ /// is triggered, avoiding the case where a large tool result is immediately summarized
+ /// away. Setting this to 1.0 effectively disables the headroom behavior, leaving only
+ /// the per-output size thresholds in effect.
+ /// Default Value: 0.7
+ /// Example: 0.7 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public ToolOutputOffloadingConfiguration( bool? enabled, + global::Vectara.ToolOutputOffloadingConfigurationMode? mode, double? contextPercentage, long? maxThresholdBytes, - long? minThresholdBytes) + long? minThresholdBytes, + double? headroomPercentage) { this.Enabled = enabled; + this.Mode = mode; this.ContextPercentage = contextPercentage; this.MaxThresholdBytes = maxThresholdBytes; this.MinThresholdBytes = minThresholdBytes; + this.HeadroomPercentage = headroomPercentage; } /// diff --git a/src/libs/Vectara/Generated/Vectara.Models.ToolOutputOffloadingConfigurationMode.g.cs b/src/libs/Vectara/Generated/Vectara.Models.ToolOutputOffloadingConfigurationMode.g.cs new file mode 100644 index 00000000..bf043226 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.Models.ToolOutputOffloadingConfigurationMode.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Vectara +{ + /// + /// How a large tool output is handled once it has been selected for offloading.
+ /// In `artifact` mode, the full output is stored as a session artifact and replaced in
+ /// the conversation with a compact reference containing the artifact id, size, shape,
+ /// and hints for the available artifact tools. The agent can then use artifact_read,
+ /// artifact_grep, or artifact_jq to retrieve just the parts it needs.
+ /// In `truncate` mode, the output is shortened in place to fit within the target size.
+ /// The head and tail are preserved and the middle is replaced with a short notice
+ /// explaining that content was omitted. No artifact is created.
+ /// When unset, the default is `artifact` if the agent has any of artifact_read,
+ /// artifact_grep, or artifact_jq configured, and `truncate` otherwise.
+ /// Example: artifact + ///
+ public enum ToolOutputOffloadingConfigurationMode + { + /// + /// + /// + Artifact, + /// + /// + /// + Truncate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ToolOutputOffloadingConfigurationModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ToolOutputOffloadingConfigurationMode value) + { + return value switch + { + ToolOutputOffloadingConfigurationMode.Artifact => "artifact", + ToolOutputOffloadingConfigurationMode.Truncate => "truncate", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ToolOutputOffloadingConfigurationMode? ToEnum(string value) + { + return value switch + { + "artifact" => ToolOutputOffloadingConfigurationMode.Artifact, + "truncate" => ToolOutputOffloadingConfigurationMode.Truncate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentRequest.g.cs index 9c45f22a..9e2c3296 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAgentRequest.g.cs @@ -33,7 +33,7 @@ public sealed partial class UpdateAgentRequest ///
/// {"customer_search":{"type":"corpora_search","argument_override":{"query":"customer support documentation"}}} [global::System.Text.Json.Serialization.JsonPropertyName("tool_configurations")] - public object? ToolConfigurations { get; set; } + public global::System.Collections.Generic.Dictionary? ToolConfigurations { get; set; } /// /// A map of skills available to the agent. Set to null to clear all skills.
@@ -85,11 +85,16 @@ public sealed partial class UpdateAgentRequest public global::Vectara.CompactionConfig? Compaction { get; set; } /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. ///
[global::System.Text.Json.Serialization.JsonPropertyName("tool_output_offloading")] public global::Vectara.ToolOutputOffloadingConfiguration? ToolOutputOffloading { get; set; } @@ -153,11 +158,16 @@ public sealed partial class UpdateAgentRequest /// Configuration for automatic context compaction. /// /// - /// Configuration for offloading large tool outputs to artifacts.
- /// When tools produce outputs exceeding the size threshold, the output is stored
- /// as an artifact and replaced with a compact reference. The agent can then use
- /// artifact_read or artifact_grep to access the full content on demand.
- /// All fields are optional; omitted fields use model-inferred defaults. + /// Controls how large tool outputs are kept from overwhelming the agent context window.
+ /// Tool outputs are inspected as they are produced. A small output is always passed through
+ /// unchanged. A larger output is handled in one of two cases: when the output on its own is
+ /// big enough to dominate the context, or when adding it to the conversation would leave
+ /// too little room for the agent to continue. In either case the output is handled according
+ /// to `mode` — stored as an artifact and replaced with a compact reference, or truncated in
+ /// place with the head and tail preserved and the middle omitted. When stored as an artifact,
+ /// the agent is expected to have artifact_read, artifact_grep, or artifact_jq configured so
+ /// it can retrieve the full content on demand.
+ /// All fields are optional; omitted fields fall back to defaults. /// /// /// A map of additional named steps keyed by step name for partial update.
@@ -171,7 +181,7 @@ public sealed partial class UpdateAgentRequest public UpdateAgentRequest( string? name, string? description, - object? toolConfigurations, + global::System.Collections.Generic.Dictionary? toolConfigurations, global::System.Collections.Generic.Dictionary? skills, global::Vectara.AgentModel? model, global::Vectara.UpdateFirstAgentStep? firstStep, diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateAnthropicLLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateAnthropicLLMRequest.g.cs index 5efd18af..8ba191d1 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateAnthropicLLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateAnthropicLLMRequest.g.cs @@ -46,6 +46,14 @@ public sealed partial class UpdateAnthropicLLMRequest [global::System.Text.Json.Serialization.JsonPropertyName("headers")] public global::System.Collections.Generic.Dictionary? Headers { get; set; } + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + ///
+ /// 300 + [global::System.Text.Json.Serialization.JsonPropertyName("idle_timeout_seconds")] + public int? IdleTimeoutSeconds { get; set; } + /// /// Whether the LLM is enabled. /// @@ -59,7 +67,7 @@ public sealed partial class UpdateAnthropicLLMRequest public object? TestModelParameters { get; set; } /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// [global::System.Text.Json.Serialization.JsonPropertyName("capabilities")] public global::Vectara.LLMCapabilities? Capabilities { get; set; } @@ -92,6 +100,10 @@ public sealed partial class UpdateAnthropicLLMRequest /// /// Optional additional headers to send with the request /// + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + /// /// /// Whether the LLM is enabled. /// @@ -99,7 +111,7 @@ public sealed partial class UpdateAnthropicLLMRequest /// Any additional parameters that are required for the LLM during the test call. /// /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -111,6 +123,7 @@ public UpdateAnthropicLLMRequest( string? description, global::Vectara.AnthropicAuth? auth, global::System.Collections.Generic.Dictionary? headers, + int? idleTimeoutSeconds, bool? enabled, object? testModelParameters, global::Vectara.LLMCapabilities? capabilities) @@ -121,6 +134,7 @@ public UpdateAnthropicLLMRequest( this.Description = description; this.Auth = auth; this.Headers = headers; + this.IdleTimeoutSeconds = idleTimeoutSeconds; this.Enabled = enabled; this.TestModelParameters = testModelParameters; this.Capabilities = capabilities; diff --git a/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequest.g.cs b/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequest.g.cs index 9c51f388..f0310a93 100644 --- a/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequest.g.cs +++ b/src/libs/Vectara/Generated/Vectara.Models.UpdateVertexAILLMRequest.g.cs @@ -41,6 +41,14 @@ public sealed partial class UpdateVertexAILLMRequest [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Vectara.JsonConverters.VertexAiAuthJsonConverter))] public global::Vectara.VertexAiAuth? Auth { get; set; } + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + ///
+ /// 300 + [global::System.Text.Json.Serialization.JsonPropertyName("idle_timeout_seconds")] + public int? IdleTimeoutSeconds { get; set; } + /// /// Whether the LLM is enabled. /// @@ -54,7 +62,7 @@ public sealed partial class UpdateVertexAILLMRequest public object? TestModelParameters { get; set; } /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// [global::System.Text.Json.Serialization.JsonPropertyName("capabilities")] public global::Vectara.LLMCapabilities? Capabilities { get; set; } @@ -85,6 +93,10 @@ public sealed partial class UpdateVertexAILLMRequest /// /// Authentication configuration for Vertex AI /// + /// + /// Maximum time in seconds the platform will wait for the model to send data before considering the connection stale and terminating it. For example, this is used as the SSE idle timeout during streaming — if no new server-sent events arrive within this window the stream is closed with an error. If unset, the platform falls back to its default read timeout for that provider (typically 60 seconds for OpenAI / Anthropic; provider SDK default for Vertex). On update, omit the field to leave the configured value unchanged or send an explicit null to clear it.
+ /// Example: 300 + /// /// /// Whether the LLM is enabled. /// @@ -92,7 +104,7 @@ public sealed partial class UpdateVertexAILLMRequest /// Any additional parameters that are required for the LLM during the test call. /// /// - /// Capabilities of a Large Language Model. + /// Capabilities of a Large Language Model. If not provided when creating an LLM, capabilities are automatically inferred from the model name and provider type. Any explicitly provided fields override the inferred defaults. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] @@ -103,6 +115,7 @@ public UpdateVertexAILLMRequest( string? uri, string? description, global::Vectara.VertexAiAuth? auth, + int? idleTimeoutSeconds, bool? enabled, object? testModelParameters, global::Vectara.LLMCapabilities? capabilities) @@ -112,6 +125,7 @@ public UpdateVertexAILLMRequest( this.Uri = uri; this.Description = description; this.Auth = auth; + this.IdleTimeoutSeconds = idleTimeoutSeconds; this.Enabled = enabled; this.TestModelParameters = testModelParameters; this.Capabilities = capabilities; diff --git a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Process.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Process.g.cs index 14a51af6..9627d740 100644 --- a/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Process.g.cs +++ b/src/libs/Vectara/Generated/Vectara.PipelineDeadLetterEntriesClient.Process.g.cs @@ -665,7 +665,7 @@ partial void ProcessProcessResponseContent( /// Specific source record IDs to process. If omitted, processes all matching dead letters. /// /// - /// Only process dead letters from this specific run. + /// Only process dead letters whose `last_run_id` matches this value. /// /// /// How this dead letter was created. diff --git a/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Cancel.g.cs b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Cancel.g.cs new file mode 100644 index 00000000..eae898f0 --- /dev/null +++ b/src/libs/Vectara/Generated/Vectara.PipelineRunsClient.Cancel.g.cs @@ -0,0 +1,589 @@ + +#nullable enable + +namespace Vectara +{ + public partial class PipelineRunsClient + { + + + private static readonly global::Vectara.EndPointSecurityRequirement s_CancelSecurityRequirement0 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "ApiKey", + SchemeId = "ApiKeyAuth", + Location = "Header", + Name = "x-api-key", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + + private static readonly global::Vectara.EndPointSecurityRequirement s_CancelSecurityRequirement1 = + new global::Vectara.EndPointSecurityRequirement + { + Authorizations = new global::Vectara.EndPointAuthorizationRequirement[] + { new global::Vectara.EndPointAuthorizationRequirement + { + Type = "OAuth2", + SchemeId = "OAuth2", + Location = "Header", + Name = "", + FriendlyName = "OAuth2", + }, + }, + }; + private static readonly global::Vectara.EndPointSecurityRequirement[] s_CancelSecurityRequirements = + new global::Vectara.EndPointSecurityRequirement[] + { s_CancelSecurityRequirement0, + s_CancelSecurityRequirement1, + }; + partial void PrepareCancelArguments( + global::System.Net.Http.HttpClient httpClient, + ref int? requestTimeout, + ref int? requestTimeoutMillis, + ref string pipelineKey, + ref string runId); + partial void PrepareCancelRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int? requestTimeout, + int? requestTimeoutMillis, + string pipelineKey, + string runId); + partial void ProcessCancelResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Cancel pipeline run
+ /// Request cancellation of an in-progress pipeline run. The run is asked to stop at the next checkpoint; it may take a moment to transition to the cancelled state. Runs that have already completed, failed, or been cancelled cannot be cancelled again. + ///
+ /// + /// + /// + /// The unique key for the pipeline. Can be user-provided or auto-generated.
+ /// Example: sharepoint-legal-ingest + /// + /// + /// The unique identifier for a pipeline run.
+ /// Example: run_pip_abc_manual_550e8400 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CancelAsync( + string pipelineKey, + string runId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + await CancelAsResponseAsync( + pipelineKey: pipelineKey, + runId: runId, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Cancel pipeline run
+ /// Request cancellation of an in-progress pipeline run. The run is asked to stop at the next checkpoint; it may take a moment to transition to the cancelled state. Runs that have already completed, failed, or been cancelled cannot be cancelled again. + ///
+ /// + /// + /// + /// The unique key for the pipeline. Can be user-provided or auto-generated.
+ /// Example: sharepoint-legal-ingest + /// + /// + /// The unique identifier for a pipeline run.
+ /// Example: run_pip_abc_manual_550e8400 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CancelAsResponseAsync( + string pipelineKey, + string runId, + int? requestTimeout = default, + int? requestTimeoutMillis = default, + global::Vectara.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareCancelArguments( + httpClient: HttpClient, + requestTimeout: ref requestTimeout, + requestTimeoutMillis: ref requestTimeoutMillis, + pipelineKey: ref pipelineKey, + runId: ref runId); + + + var __authorizations = global::Vectara.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CancelSecurityRequirements, + operationName: "CancelAsync"); + + using var __timeoutCancellationTokenSource = global::Vectara.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Vectara.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Vectara.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Vectara.PathBuilder( + path: $"/v2/pipelines/{pipelineKey}/runs/{runId}/cancel", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + if (requestTimeout != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout", requestTimeout.ToString()); + } + if (requestTimeoutMillis != default) + { + __httpRequest.Headers.TryAddWithoutValidation("Request-Timeout-Millis", requestTimeoutMillis.ToString()); + } + + global::Vectara.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCancelRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + requestTimeout: requestTimeout, + requestTimeoutMillis: requestTimeoutMillis, + pipelineKey: pipelineKey!, + runId: runId!); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Vectara.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Cancel", + methodName: "CancelAsync", + pathTemplate: "$\"/v2/pipelines/{pipelineKey}/runs/{runId}/cancel\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await global::Vectara.VectaraClient.AutoSDKOAuth2Helpers.SendAsync( + httpClient: HttpClient, + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + authorizations: __authorizations, + oAuth2Coordinator: AutoSDKOAuth2State, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Cancel", + methodName: "CancelAsync", + pathTemplate: "$\"/v2/pipelines/{pipelineKey}/runs/{runId}/cancel\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Cancel", + methodName: "CancelAsync", + pathTemplate: "$\"/v2/pipelines/{pipelineKey}/runs/{runId}/cancel\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCancelResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Cancel", + methodName: "CancelAsync", + pathTemplate: "$\"/v2/pipelines/{pipelineKey}/runs/{runId}/cancel\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "Cancel", + methodName: "CancelAsync", + pathTemplate: "$\"/v2/pipelines/{pipelineKey}/runs/{runId}/cancel\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Permissions do not allow cancelling this run. + if ((int)__response.StatusCode == 403) + { + string? __content_403 = null; + global::System.Exception? __exception_403 = null; + global::Vectara.Error? __value_403 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + else + { + __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_403 = global::Vectara.Error.FromJson(__content_403, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_403 = __ex; + } + + throw new global::Vectara.ApiException( + message: __content_403 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_403, + statusCode: __response.StatusCode) + { + ResponseBody = __content_403, + ResponseObject = __value_403, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Pipeline or run not found. + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Vectara.NotFoundError? __value_404 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + else + { + __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_404 = global::Vectara.NotFoundError.FromJson(__content_404, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + throw new global::Vectara.ApiException( + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // The run is not in a cancellable state. It has already completed, failed, or had cancellation requested. + if ((int)__response.StatusCode == 409) + { + string? __content_409 = null; + global::System.Exception? __exception_409 = null; + global::Vectara.Error? __value_409 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + else + { + __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_409 = global::Vectara.Error.FromJson(__content_409, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_409 = __ex; + } + + throw new global::Vectara.ApiException( + message: __content_409 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_409, + statusCode: __response.StatusCode) + { + ResponseBody = __content_409, + ResponseObject = __value_409, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + throw new global::Vectara.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + return new global::Vectara.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Vectara.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + } +} \ No newline at end of file diff --git a/src/libs/Vectara/openapi.yaml b/src/libs/Vectara/openapi.yaml index 80ada597..0cf8a6a1 100644 --- a/src/libs/Vectara/openapi.yaml +++ b/src/libs/Vectara/openapi.yaml @@ -11581,6 +11581,61 @@ paths: $ref: '#/components/schemas/NotFoundError' x-fern-sdk-group-name: pipeline_runs x-fern-sdk-method-name: get + /v2/pipelines/{pipeline_key}/runs/{run_id}/cancel: + post: + tags: + - Pipeline Runs + summary: Cancel pipeline run + x-required-roles: + - type: ApiRole + roles: + - pipeline_administrator + - administrator + - owner + description: Request cancellation of an in-progress pipeline run. The run is + asked to stop at the next checkpoint; it may take a moment to transition to + the cancelled state. Runs that have already completed, failed, or been cancelled + cannot be cancelled again. + operationId: cancelPipelineRun + parameters: + - $ref: '#/components/parameters/RequestTimeout' + - $ref: '#/components/parameters/RequestTimeoutMillis' + - in: path + name: pipeline_key + description: The unique key of the pipeline. + required: true + schema: + $ref: '#/components/schemas/PipelineKey' + - in: path + name: run_id + description: The unique identifier of the run. + required: true + schema: + $ref: '#/components/schemas/PipelineRunId' + responses: + '204': + description: Cancellation has been requested. + '403': + description: Permissions do not allow cancelling this run. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + '404': + description: Pipeline or run not found. + content: + application/json: + schema: + $ref: '#/components/schemas/NotFoundError' + '409': + description: The run is not in a cancellable state. It has already completed, + failed, or had cancellation requested. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + x-fern-sdk-group-name: pipeline_runs + x-fern-sdk-method-name: cancel /v2/agent_analytics/traces: get: tags: @@ -15454,7 +15509,9 @@ components: type: boolean example: false LLMCapabilities: - description: Capabilities of a Large Language Model. + description: Capabilities of a Large Language Model. If not provided when creating + an LLM, capabilities are automatically inferred from the model name and provider + type. Any explicitly provided fields override the inferred defaults. type: object properties: image_support: @@ -15652,6 +15709,21 @@ components: - $ref: '#/components/schemas/OAuthClientCredentialsAuth' required: - type + IdleTimeoutSeconds: + description: "Maximum time in seconds the platform will wait for the model to\ + \ send data before considering the connection stale and terminating it. For\ + \ example, this is used as the SSE idle timeout during streaming \u2014 if\ + \ no new server-sent events arrive within this window the stream is closed\ + \ with an error. If unset, the platform falls back to its default read timeout\ + \ for that provider (typically 60 seconds for OpenAI / Anthropic; provider\ + \ SDK default for Vertex). On update, omit the field to leave the configured\ + \ value unchanged or send an explicit null to clear it." + type: integer + format: int32 + nullable: true + minimum: 1 + maximum: 3600 + example: 300 OpenAILLMRequestBase: description: Common fields for OpenAI-compatible and Responses API LLM requests. type: object @@ -15691,6 +15763,8 @@ components: type: object additionalProperties: type: string + idle_timeout_seconds: + $ref: '#/components/schemas/IdleTimeoutSeconds' test_model_parameters: description: Any additional parameters that are required for the LLM during the test call. @@ -15833,6 +15907,8 @@ components: example: https://us-central1-aiplatform.googleapis.com/v1/projects/my-project/locations/us-central1 auth: $ref: '#/components/schemas/VertexAiAuth' + idle_timeout_seconds: + $ref: '#/components/schemas/IdleTimeoutSeconds' test_model_parameters: description: Any additional parameters that are required for the LLM during the test call. @@ -16019,6 +16095,8 @@ components: type: object additionalProperties: type: string + idle_timeout_seconds: + $ref: '#/components/schemas/IdleTimeoutSeconds' test_model_parameters: description: Any additional parameters that are required for the LLM during the test call. @@ -16077,6 +16155,8 @@ components: type: object additionalProperties: type: string + idle_timeout_seconds: + $ref: '#/components/schemas/IdleTimeoutSeconds' enabled: description: Whether the LLM is enabled. type: boolean @@ -16146,6 +16226,8 @@ components: nullable: false auth: $ref: '#/components/schemas/VertexAiAuth' + idle_timeout_seconds: + $ref: '#/components/schemas/IdleTimeoutSeconds' enabled: description: Whether the LLM is enabled. type: boolean @@ -16186,6 +16268,8 @@ components: type: object additionalProperties: type: string + idle_timeout_seconds: + $ref: '#/components/schemas/IdleTimeoutSeconds' enabled: description: Whether the LLM is enabled. type: boolean @@ -18870,6 +18954,33 @@ components: minLength: 1 maxLength: 50 example: Customer Support Agent + OutputTransform: + description: "An optional jq expression applied to the tool's JSON output before\ + \ it is returned to the LLM.\nUse this to project, filter, or summarize tool\ + \ output to keep responses concise and on-topic.\n\nThe expression operates\ + \ on the tool's response JSON and the result replaces the original output.\n\ + If the expression fails to compile or evaluate at runtime, the tool call is\ + \ reported to the LLM as\nan error so the agent can react.\n\nExamples:\n\ + \ - `.results | map({title, url})` \u2014 keep only title/url for each result\n\ + \ - `.items[0:5]` \u2014 first 5 items\n - `del(.debug)` \u2014 drop a noisy\ + \ field\n" + type: string + maxLength: 4096 + example: .results | map({title, url}) + AgentToolConfigurationBase: + description: Base properties shared by all inline tool configurations on an + agent. + type: object + properties: + description: + description: Optional override for the tool's description shown to the LLM. + When set, replaces the description from the underlying tool definition. + type: string + example: Search the customer support knowledge base + description_template: + $ref: '#/components/schemas/ToolDescriptionTemplate' + output_transform: + $ref: '#/components/schemas/OutputTransform' InlineDynamicVectaraToolConfiguration: title: InlineDynamicVectaraToolConfiguration description: 'An inline configuration for built-in Vectara tools that have implementations @@ -18878,75 +18989,75 @@ components: required for this configuration. ' - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'dynamic_vectara' - for generic Vectara tool configurations. - default: dynamic_vectara - tool_id: - $ref: '#/components/schemas/ToolId' - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - description: "Optional hardcoded arguments for tool calls. The key specifies\ - \ the location in the tool arguments to overide, and the value specifies\ - \ what to override with. The LLM will not be able to change the parameters,\ - \ nor know those values exist within the tool.\n\nThe values can also\ - \ be dynamic references to context values using $ref with dot notation\ - \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ - \ `{\"$ref\": \"session.metadata.field_name\"}`\n\nReferences are resolved\ - \ at runtime from context:\n- session.metadata.* - Access session metadata\ - \ fields\n- agent.metadata.* - Access agent metadata fields\n\nExample:\n\ - \ `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\nIf you want\ - \ to have a real value `\"$ref\"` use `\"$$ref\"`, that is you can escape\ - \ the first $ by using $$." - type: object - additionalProperties: true - example: - custom_param: value - limit: 10 - required: - - tool_id - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'dynamic_vectara' + for generic Vectara tool configurations. + default: dynamic_vectara + tool_id: + $ref: '#/components/schemas/ToolId' + argument_override: + description: "Optional hardcoded arguments for tool calls. The key specifies\ + \ the location in the tool arguments to overide, and the value specifies\ + \ what to override with. The LLM will not be able to change the parameters,\ + \ nor know those values exist within the tool.\n\nThe values can also\ + \ be dynamic references to context values using $ref with dot notation\ + \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ + \ `{\"$ref\": \"session.metadata.field_name\"}`\n\nReferences are resolved\ + \ at runtime from context:\n- session.metadata.* - Access session metadata\ + \ fields\n- agent.metadata.* - Access agent metadata fields\n\nExample:\n\ + \ `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\nIf you\ + \ want to have a real value `\"$ref\"` use `\"$$ref\"`, that is you\ + \ can escape the first $ by using $$." + type: object + additionalProperties: true + example: + custom_param: value + limit: 10 + required: + - tool_id + - type x-vectaraParents: - AgentToolConfiguration InlineMcpToolConfiguration: title: InlineMcpToolConfiguration description: An MCP tool configuration defined inline in the agent. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'mcp' for inline - MCP tool configurations. - default: mcp - tool_id: - $ref: '#/components/schemas/ToolId' - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - description: "Optional hardcoded arguments for tool calls. The key specifies\ - \ the location in the tool arguments to overide, and the value specifies\ - \ what to override with. The LLM will not be able to change the parameters,\ - \ nor know those values exist within the tool.\n\nThe values can also\ - \ be dynamic references to context values using $ref with dot notation\ - \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ - \ `{\"$ref\": \"session.metadata.field_name\"}`\n\nReferences are resolved\ - \ at runtime from context:\n- session.metadata.* - Access session metadata\ - \ fields\n- agent.metadata.* - Access agent metadata fields\n\nExample:\n\ - \ `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\nIf you want\ - \ to have a real value `\"$ref\"` use `\"$$ref\"`, that is you can escape\ - \ the first $ by using $$." - type: object - additionalProperties: true - example: - custom_param: value - limit: 10 - required: - - tool_id - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'mcp' for + inline MCP tool configurations. + default: mcp + tool_id: + $ref: '#/components/schemas/ToolId' + argument_override: + description: "Optional hardcoded arguments for tool calls. The key specifies\ + \ the location in the tool arguments to overide, and the value specifies\ + \ what to override with. The LLM will not be able to change the parameters,\ + \ nor know those values exist within the tool.\n\nThe values can also\ + \ be dynamic references to context values using $ref with dot notation\ + \ path syntax:\n- Static value: \"fixed_value\" or 123\n- Dynamic reference:\ + \ `{\"$ref\": \"session.metadata.field_name\"}`\n\nReferences are resolved\ + \ at runtime from context:\n- session.metadata.* - Access session metadata\ + \ fields\n- agent.metadata.* - Access agent metadata fields\n\nExample:\n\ + \ `{\"query\": {\"$ref\": \".session.metadata.query\"}}`\n\nIf you\ + \ want to have a real value `\"$ref\"` use `\"$$ref\"`, that is you\ + \ can escape the first $ by using $$." + type: object + additionalProperties: true + example: + custom_param: value + limit: 10 + required: + - tool_id + - type x-vectaraParents: - AgentToolConfiguration CorporaSearchToolParameters: @@ -19077,28 +19188,28 @@ components: InlineCorporaSearchToolConfiguration: title: InlineCorporaSearchToolConfiguration description: A corpora search tool configuration defined inline in the agent. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'corpora_search' - for inline corpora search tool configurations. - default: corpora_search - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - description: Optional hardcoded arguments for the corpus search call such - as the query. When specified, these values will be used instead of allowing - the LLM to fill in those parameters. - $ref: '#/components/schemas/CorporaSearchToolParameters' - query_configuration: - description: User-configurable settings for the corpus search that are not - exposed to the LLM. Supports dynamic references for runtime resolution - from session context. - $ref: '#/components/schemas/AgentCorporaSearchQueryConfiguration' - required: - - type - - query_configuration + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'corpora_search' + for inline corpora search tool configurations. + default: corpora_search + argument_override: + description: Optional hardcoded arguments for the corpus search call such + as the query. When specified, these values will be used instead of allowing + the LLM to fill in those parameters. + $ref: '#/components/schemas/CorporaSearchToolParameters' + query_configuration: + description: User-configurable settings for the corpus search that are + not exposed to the LLM. Supports dynamic references for runtime resolution + from session context. + $ref: '#/components/schemas/AgentCorporaSearchQueryConfiguration' + required: + - type + - query_configuration x-vectaraParents: - AgentToolConfiguration WebSearchToolParameters: @@ -19150,22 +19261,22 @@ components: InlineWebSearchToolConfiguration: title: InlineWebSearchToolConfiguration description: A web search tool configuration defined inline in the agent. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'web_search' - for inline web search tool configurations. - default: web_search - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - description: Optional hardcoded arguments for the web search tool call such - as limit etc. When specified, these values will be used instead of allowing - the LLM to fill in those parameters. - $ref: '#/components/schemas/WebSearchToolParameters' - required: - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'web_search' + for inline web search tool configurations. + default: web_search + argument_override: + description: Optional hardcoded arguments for the web search tool call + such as limit etc. When specified, these values will be used instead + of allowing the LLM to fill in those parameters. + $ref: '#/components/schemas/WebSearchToolParameters' + required: + - type x-vectaraParents: - AgentToolConfiguration WebGetToolParameters: @@ -19234,50 +19345,50 @@ components: title: InlineWebGetToolConfiguration description: A web get tool configuration defined inline in the agent for fetching content from URLs. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'web_get' for - inline web get tool configurations. - default: web_get - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - description: Optional hardcoded arguments for the web get tool call. When - specified, these values will be used instead of allowing the LLM to fill - in those parameters. - $ref: '#/components/schemas/WebGetToolParameters' - required: - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'web_get' + for inline web get tool configurations. + default: web_get + argument_override: + description: Optional hardcoded arguments for the web get tool call. When + specified, these values will be used instead of allowing the LLM to + fill in those parameters. + $ref: '#/components/schemas/WebGetToolParameters' + required: + - type x-vectaraParents: - AgentToolConfiguration InlineLambdaToolConfiguration: title: InlineLambdaToolConfiguration description: A lambda tool configuration defined inline in the agent for executing user-defined functions. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'lambda' for - inline lambda tool configurations. - default: lambda - tool_id: - $ref: '#/components/schemas/ToolId' - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - description: Optional hardcoded arguments that will be passed to the lambda - function. When specified, these values will be used instead of allowing - the LLM to fill in those parameters. - type: object - additionalProperties: true - example: - custom_param: value - required: - - tool_id - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'lambda' + for inline lambda tool configurations. + default: lambda + tool_id: + $ref: '#/components/schemas/ToolId' + argument_override: + description: Optional hardcoded arguments that will be passed to the lambda + function. When specified, these values will be used instead of allowing + the LLM to fill in those parameters. + type: object + additionalProperties: true + example: + custom_param: value + required: + - tool_id + - type x-vectaraParents: - AgentToolConfiguration SubAgentToolParameters: @@ -19338,39 +19449,39 @@ components: title: InlineSubAgentToolConfiguration description: A sub-agent tool configuration defined inline in the agent for invoking specialized sub-agents. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'sub_agent' - for inline sub-agent tool configurations. - default: sub_agent - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - $ref: '#/components/schemas/SubAgentToolParameters' - sub_agent_configuration: - $ref: '#/components/schemas/SubAgentConfiguration' - required: - - type - - sub_agent_configuration + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'sub_agent' + for inline sub-agent tool configurations. + default: sub_agent + argument_override: + $ref: '#/components/schemas/SubAgentToolParameters' + sub_agent_configuration: + $ref: '#/components/schemas/SubAgentConfiguration' + required: + - type + - sub_agent_configuration x-vectaraParents: - AgentToolConfiguration InlineArtifactCreateToolConfiguration: title: InlineArtifactCreateToolConfiguration description: An artifact create tool configuration defined inline in the agent for creating artifacts on-the-fly from text or structured data content. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'artifact_create' - for inline artifact create tool configurations. - default: artifact_create - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - required: - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'artifact_create' + for inline artifact create tool configurations. + default: artifact_create + required: + - type x-vectaraParents: - AgentToolConfiguration ArtifactReadToolParameters: @@ -19424,21 +19535,21 @@ components: title: InlineArtifactReadToolConfiguration description: An artifact read tool configuration defined inline in the agent for reading artifacts from the session workspace. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'artifact_read' - for inline artifact read tool configurations. - default: artifact_read - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - $ref: '#/components/schemas/ArtifactReadToolParameters' - tool_configuration: - $ref: '#/components/schemas/ArtifactReadConfiguration' - required: - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'artifact_read' + for inline artifact read tool configurations. + default: artifact_read + argument_override: + $ref: '#/components/schemas/ArtifactReadToolParameters' + tool_configuration: + $ref: '#/components/schemas/ArtifactReadConfiguration' + required: + - type x-vectaraParents: - AgentToolConfiguration ArtifactGrepToolParameters: @@ -19467,19 +19578,19 @@ components: title: InlineArtifactGrepToolConfiguration description: An artifact grep tool configuration defined inline in the agent for searching through artifact content. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'artifact_grep' - for inline artifact grep tool configurations. - default: artifact_grep - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - $ref: '#/components/schemas/ArtifactGrepToolParameters' - required: - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'artifact_grep' + for inline artifact grep tool configurations. + default: artifact_grep + argument_override: + $ref: '#/components/schemas/ArtifactGrepToolParameters' + required: + - type x-vectaraParents: - AgentToolConfiguration ImageReadToolParameters: @@ -19506,19 +19617,19 @@ components: title: InlineImageReadToolConfiguration description: An image read tool configuration defined inline in the agent for loading images into the conversation context. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'image_read' - for inline image read tool configurations. - default: image_read - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - $ref: '#/components/schemas/ImageReadToolParameters' - required: - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'image_read' + for inline image read tool configurations. + default: image_read + argument_override: + $ref: '#/components/schemas/ImageReadToolParameters' + required: + - type x-vectaraParents: - AgentToolConfiguration DocumentConversionToolParameters: @@ -19546,19 +19657,19 @@ components: title: InlineDocumentConversionToolConfiguration description: A document conversion tool configuration defined inline in the agent for converting document artifacts to various formats. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'document_conversion' - for inline document conversion tool configurations. - default: document_conversion - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - $ref: '#/components/schemas/DocumentConversionToolParameters' - required: - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'document_conversion' + for inline document conversion tool configurations. + default: document_conversion + argument_override: + $ref: '#/components/schemas/DocumentConversionToolParameters' + required: + - type x-vectaraParents: - AgentToolConfiguration GetDocumentTextParameters: @@ -19605,27 +19716,29 @@ components: title: InlineGetDocumentTextToolConfiguration description: A get document text tool configuration defined inline in the agent for fetching document text content from a corpus. - type: object - properties: - type: - type: string - description: The type of tool configuration, which is always 'get_document_text' - for inline get document text tool configurations. - default: get_document_text - description_template: - $ref: '#/components/schemas/ToolDescriptionTemplate' - argument_override: - $ref: '#/components/schemas/GetDocumentTextParameters' - tool_configuration: - $ref: '#/components/schemas/GetDocumentTextConfiguration' - required: - - type + allOf: + - $ref: '#/components/schemas/AgentToolConfigurationBase' + - type: object + properties: + type: + type: string + description: The type of tool configuration, which is always 'get_document_text' + for inline get document text tool configurations. + default: get_document_text + argument_override: + $ref: '#/components/schemas/GetDocumentTextParameters' + tool_configuration: + $ref: '#/components/schemas/GetDocumentTextConfiguration' + required: + - type x-vectaraParents: - AgentToolConfiguration AgentToolConfiguration: title: AgentToolConfiguration description: A tool configuration that can be used by an agent, defined inline with a specific configuration type. + type: object + x-vectara-base-schema: '#/AgentToolConfigurationBase' discriminator: propertyName: type mapping: @@ -19944,6 +20057,42 @@ components: minItems: 1 example: - tool_output + fire_every: + description: 'Fire this reminder on every Nth matching hook event (counted + independently per hook). Defaults to 1, which preserves the legacy + + behavior of firing on every matching event. Must be at least 1. + + + Counters reset after a session compaction: the post-compaction event stream + is treated as a fresh sequence (index 0), so + + `skip_first` warmup applies again from the first new matching event. + + ' + type: integer + format: int32 + minimum: 1 + default: 1 + example: 3 + skip_first: + description: 'Skip the first N matching hook events at session start before + firing this reminder for the first time (counted independently per hook). + + Defaults to 0, meaning no warmup delay. Must be non-negative. + + + Counters reset after a session compaction: the post-compaction event stream + is treated as a fresh sequence (index 0), so + + the warmup applies again from the first new matching event. + + ' + type: integer + format: int32 + minimum: 0 + default: 0 + example: 2 required: - type - template @@ -20307,78 +20456,157 @@ components: default: include_outputs ToolOutputOffloadingConfiguration: title: ToolOutputOffloadingConfiguration - description: 'Configuration for offloading large tool outputs to artifacts. - - When tools produce outputs exceeding the size threshold, the output is stored - - as an artifact and replaced with a compact reference. The agent can then use - - artifact_read or artifact_grep to access the full content on demand. - - All fields are optional; omitted fields use model-inferred defaults. - - ' + description: "Controls how large tool outputs are kept from overwhelming the\ + \ agent context window.\n\nTool outputs are inspected as they are produced.\ + \ A small output is always passed through\nunchanged. A larger output is handled\ + \ in one of two cases: when the output on its own is\nbig enough to dominate\ + \ the context, or when adding it to the conversation would leave\ntoo little\ + \ room for the agent to continue. In either case the output is handled according\n\ + to `mode` \u2014 stored as an artifact and replaced with a compact reference,\ + \ or truncated in\nplace with the head and tail preserved and the middle omitted.\ + \ When stored as an artifact,\nthe agent is expected to have artifact_read,\ + \ artifact_grep, or artifact_jq configured so\nit can retrieve the full content\ + \ on demand.\n\nAll fields are optional; omitted fields fall back to defaults.\n" type: object properties: enabled: - description: 'Whether tool output offloading is enabled. If not specified, - defaults to true + description: 'Whether tool output offloading is active. Defaults to true. + When disabled, tool - when the agent has artifact_read configured, false otherwise. + outputs are always passed through to the agent verbatim. ' type: boolean example: true + mode: + description: 'How a large tool output is handled once it has been selected + for offloading. + + + In `artifact` mode, the full output is stored as a session artifact and + replaced in + + the conversation with a compact reference containing the artifact id, + size, shape, + + and hints for the available artifact tools. The agent can then use artifact_read, + + artifact_grep, or artifact_jq to retrieve just the parts it needs. + + + In `truncate` mode, the output is shortened in place to fit within the + target size. + + The head and tail are preserved and the middle is replaced with a short + notice + + explaining that content was omitted. No artifact is created. + + + When unset, the default is `artifact` if the agent has any of artifact_read, + + artifact_grep, or artifact_jq configured, and `truncate` otherwise. + + ' + type: string + enum: + - artifact + - truncate + example: artifact context_percentage: - description: 'Percentage of the model''s context window to use as the offloading - threshold, + description: 'The fraction of the model''s context window that a single + tool output is allowed to + + occupy before it is considered large enough to offload on its own, estimated + at four - estimated at 4 characters per token. This is a rough heuristic that varies + characters per token. The resulting byte threshold is clamped between - across LLMs. The resulting byte threshold is clamped between min_threshold_bytes + `min_threshold_bytes` and `max_threshold_bytes`, so for very large context + models - and max_threshold_bytes, so this percentage only has an effect when it - produces + this percentage is usually dominated by `max_threshold_bytes`, and for + very small - a value lower than max_threshold_bytes. + context models it is dominated by `min_threshold_bytes`. ' type: number format: double minimum: 0.01 maximum: 1 - default: 0.05 - example: 0.05 + default: 0.25 + example: 0.25 max_threshold_bytes: - description: 'Tool outputs above this size (in bytes) will always be offloaded. - Acts as a + description: 'An absolute ceiling on single-output size. Any output above + this many bytes is - ceiling on the context_percentage-derived threshold. For large-context - models, + considered large enough to offload on its own, regardless of the model''s + context - max_threshold_bytes is typically the effective threshold since the + window. This prevents unusually large outputs from slipping through on + models with - context_percentage calculation exceeds it. + very large context windows. ' type: integer format: int64 minimum: 1024 - example: 32768 + example: 1048576 min_threshold_bytes: - description: 'Tool outputs below this size (in bytes) will never be offloaded. - Acts as a + description: 'A hard floor on offloading. Tool outputs below this size are + always passed through - floor on the context_percentage-derived threshold, ensuring small outputs - are + to the agent unchanged, even when cumulative context usage is high. This + ensures that - never offloaded even for models with small context windows. + short, useful outputs are never unnecessarily truncated or replaced with + a reference. ' type: integer format: int64 minimum: 1024 example: 4096 + headroom_percentage: + description: 'The fraction of the model''s context window at which offloading + becomes sensitive to + + cumulative usage. When adding a tool output would push total input tokens + above this + + fraction of the context window (estimated at four characters per token), + the output + + is offloaded even if it would otherwise be considered small enough to + pass through. + + + This is independent of the compaction `threshold_percent`: both can be + configured on + + the same agent and both can apply. In practice it is often useful to set + this below + + the compaction threshold so that large tool outputs are offloaded before + compaction + + is triggered, avoiding the case where a large tool result is immediately + summarized + + away. Setting this to 1.0 effectively disables the headroom behavior, + leaving only + + the per-output size thresholds in effect. + + ' + type: number + format: double + minimum: 0.01 + maximum: 1 + default: 0.7 + example: 0.7 Agent: description: An AI agent that can use tools to provide intelligent responses and actions. @@ -21253,8 +21481,8 @@ components: **Lifecycle**: Artifacts are created when users upload files via multipart requests or when agent tools generate new files (such as converting a PDF to markdown). Artifacts have a configurable time-to-live and are automatically - removed when they expire or when the session is deleted. Size limits apply - to individual artifacts and total session storage. + removed when they expire or when the session is deleted. A per-artifact size + limit applies to each upload. **How Agents Use Artifacts**: Agent tools can read artifacts, process them, @@ -23326,8 +23554,7 @@ components: type: string nullable: true last_run_id: - description: The ID of the pipeline run that most recently processed (or - failed) this record. + description: The ID of the run that most recently attempted this record. allOf: - $ref: '#/components/schemas/PipelineRunId' nullable: true @@ -23408,7 +23635,8 @@ components: items: type: string last_run_id: - description: Only process dead letters from this specific run. + description: Only process dead letters whose `last_run_id` matches this + value. allOf: - $ref: '#/components/schemas/PipelineRunId' origin: