Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#nullable enable

namespace Vectara
{
public partial interface IAgentAliasesSessionsClient
{
/// <summary>
/// List outstanding client tool calls on alias-routed session<br/>
/// List the client tool calls a session originally created via this alias is currently waiting on the caller to fulfill. Each entry carries the fully materialized arguments to invoke the tool with; secret-derived values are returned unmasked because the caller needs them to execute the tool, so this endpoint is restricted to the same roles permitted to submit input to the session. Empty when the session is not parked on a client tool. See the agent-scoped endpoint for the full contract.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
/// <param name="aliasKey">
/// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.<br/>
/// Example: support
/// </param>
/// <param name="sessionKey">
/// A unique key that identifies an agent session.<br/>
/// Example: customer_support_chat
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vectara.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Vectara.OutstandingClientToolCallsResponse> ListOutstandingClientToolCallsAsync(
string aliasKey,
string sessionKey,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List outstanding client tool calls on alias-routed session<br/>
/// List the client tool calls a session originally created via this alias is currently waiting on the caller to fulfill. Each entry carries the fully materialized arguments to invoke the tool with; secret-derived values are returned unmasked because the caller needs them to execute the tool, so this endpoint is restricted to the same roles permitted to submit input to the session. Empty when the session is not parked on a client tool. See the agent-scoped endpoint for the full contract.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
/// <param name="aliasKey">
/// The unique key identifying an alias. Alias keys are independent of agent keys — the same string may exist as both an alias and an agent in a customer; calls to `/v2/agent_aliases/{key}/...` target the alias and calls to `/v2/agents/{key}/...` target the agent.<br/>
/// Example: support
/// </param>
/// <param name="sessionKey">
/// A unique key that identifies an agent session.<br/>
/// Example: customer_support_chat
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vectara.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Vectara.AutoSDKHttpResponse<global::Vectara.OutstandingClientToolCallsResponse>> ListOutstandingClientToolCallsAsResponseAsync(
string aliasKey,
string sessionKey,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#nullable enable

namespace Vectara
{
public partial interface IAgentEventsClient
{
/// <summary>
/// List outstanding client tool calls for an agent session<br/>
/// List the client tool calls the session is currently waiting on the caller to fulfill. Each entry carries the originating `tool_input` event ID, the tool name, and the fully materialized arguments to invoke the tool with. Secret-derived values are returned unmasked because the caller needs them to execute the tool, so this endpoint is restricted to the same roles permitted to submit input to the session.<br/>
/// Returns an empty list when the session is not parked on a client tool. The corresponding `client_tool_pending` event is delivered only on the live event stream and is not returned by `listAgentEvents`; this endpoint is the durable way to recover the pending calls after a reconnect. Submit one `tool_output` per returned `event_id` (via the create-input endpoint) to resume the session.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
/// <param name="agentKey">
/// A unique key that identifies an agent.<br/>
/// Example: customer_support
/// </param>
/// <param name="sessionKey">
/// A unique key that identifies an agent session.<br/>
/// Example: customer_support_chat
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vectara.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Vectara.OutstandingClientToolCallsResponse> ListOutstandingClientToolCallsAsync(
string agentKey,
string sessionKey,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List outstanding client tool calls for an agent session<br/>
/// List the client tool calls the session is currently waiting on the caller to fulfill. Each entry carries the originating `tool_input` event ID, the tool name, and the fully materialized arguments to invoke the tool with. Secret-derived values are returned unmasked because the caller needs them to execute the tool, so this endpoint is restricted to the same roles permitted to submit input to the session.<br/>
/// Returns an empty list when the session is not parked on a client tool. The corresponding `client_tool_pending` event is delivered only on the live event stream and is not returned by `listAgentEvents`; this endpoint is the durable way to recover the pending calls after a reconnect. Submit one `tool_output` per returned `event_id` (via the create-input endpoint) to resume the session.
/// </summary>
/// <param name="requestTimeout"></param>
/// <param name="requestTimeoutMillis"></param>
/// <param name="agentKey">
/// A unique key that identifies an agent.<br/>
/// Example: customer_support
/// </param>
/// <param name="sessionKey">
/// A unique key that identifies an agent session.<br/>
/// Example: customer_support_chat
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Vectara.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Vectara.AutoSDKHttpResponse<global::Vectara.OutstandingClientToolCallsResponse>> ListOutstandingClientToolCallsAsResponseAsync(
string agentKey,
string sessionKey,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
15 changes: 15 additions & 0 deletions src/libs/Vectara/Generated/Vectara.JsonConverters.AgentEvent.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ public class AgentEventJsonConverter : global::System.Text.Json.Serialization.Js
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.SessionInterruptedEvent)}");
sessionInterrupted = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.ClientToolPendingEvent? clientToolPending = default;
if (discriminator?.Type == global::Vectara.AgentEventDiscriminatorType.ClientToolPending)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ClientToolPendingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.ClientToolPendingEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ClientToolPendingEvent)}");
clientToolPending = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.ImageReadEvent? imageRead = default;
if (discriminator?.Type == global::Vectara.AgentEventDiscriminatorType.ImageRead)
{
Expand Down Expand Up @@ -144,6 +151,8 @@ public class AgentEventJsonConverter : global::System.Text.Json.Serialization.Js

sessionInterrupted,

clientToolPending,

imageRead,

stepTransition,
Expand Down Expand Up @@ -229,6 +238,12 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SessionInterruptedEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.SessionInterrupted!.Value, typeInfo);
}
else if (value.IsClientToolPending)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ClientToolPendingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.ClientToolPendingEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ClientToolPendingEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.ClientToolPending!.Value, typeInfo);
}
else if (value.IsImageRead)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ImageReadEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.ImageReadEvent> ??
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ public class AgentStreamedResponseJsonConverter : global::System.Text.Json.Seria
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.SessionInterruptedEvent)}");
sessionInterrupted = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.ClientToolPendingEvent? clientToolPending = default;
if (discriminator?.Type == global::Vectara.AgentStreamedResponseDiscriminatorType.ClientToolPending)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ClientToolPendingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.ClientToolPendingEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.ClientToolPendingEvent)}");
clientToolPending = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.ImageReadEvent? imageRead = default;
if (discriminator?.Type == global::Vectara.AgentStreamedResponseDiscriminatorType.ImageRead)
{
Expand Down Expand Up @@ -208,6 +215,8 @@ public class AgentStreamedResponseJsonConverter : global::System.Text.Json.Seria

sessionInterrupted,

clientToolPending,

imageRead,

stepTransition,
Expand Down Expand Up @@ -325,6 +334,12 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.SessionInterruptedEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.SessionInterrupted!.Value, typeInfo);
}
else if (value.IsClientToolPending)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ClientToolPendingEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.ClientToolPendingEvent> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.ClientToolPendingEvent).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.ClientToolPending!.Value, typeInfo);
}
else if (value.IsImageRead)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.ImageReadEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.ImageReadEvent> ??
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ public class AgentToolConfigurationJsonConverter : global::System.Text.Json.Seri
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.InlineLambdaToolConfiguration)}");
lambda = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.InlineClientToolConfiguration? client = default;
if (discriminator?.Type == global::Vectara.AgentToolConfigurationDiscriminatorType.Client)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineClientToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.InlineClientToolConfiguration> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.InlineClientToolConfiguration)}");
client = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.InlineSubAgentToolConfiguration? subAgent = default;
if (discriminator?.Type == global::Vectara.AgentToolConfigurationDiscriminatorType.SubAgent)
{
Expand Down Expand Up @@ -127,6 +134,8 @@ public class AgentToolConfigurationJsonConverter : global::System.Text.Json.Seri

lambda,

client,

subAgent,

artifactCreate,
Expand Down Expand Up @@ -190,6 +199,12 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineLambdaToolConfiguration).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Lambda!.Value, typeInfo);
}
else if (value.IsClient)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineClientToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.InlineClientToolConfiguration> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineClientToolConfiguration).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Client!.Value, typeInfo);
}
else if (value.IsSubAgent)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineSubAgentToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.InlineSubAgentToolConfiguration> ??
Expand Down
Loading