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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ internal static partial class AgentsListAgentSessionsCommandApiCommand
Description = @"Only return sessions whose root agent has this ID. Omit to return sessions for all agents.",
};

private static Option<global::System.Collections.Generic.Dictionary<string, string>?> Metadata { get; } = new(
name: @"--metadata")
{
Description = @"Exact string matches supplied as `metadata[key]=value`. All supplied pairs must match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512 characters. New sessions and metadata updates may take time to appear in filtered results.",
};

private static string FormatResponse(ParseResult parseResult, global::tryAGI.OpenAI.SessionListResource value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
Expand Down Expand Up @@ -61,6 +67,7 @@ public static Command Create(string? commandName = null)
command.Options.Add(Order);
command.Options.Add(After);
command.Options.Add(AgentId);
command.Options.Add(Metadata);


command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) =>
Expand All @@ -70,6 +77,7 @@ await CliRuntime.RunAsync(async () =>
var order = parseResult.GetValue(Order);
var after = parseResult.GetValue(After);
var agentId = parseResult.GetValue(AgentId);
var metadata = parseResult.GetValue(Metadata);
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


Expand All @@ -78,6 +86,7 @@ await CliRuntime.RunAsync(async () =>
order: order,
after: after,
agentId: agentId,
metadata: metadata,
cancellationToken: cancellationToken).ConfigureAwait(false);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ partial void PrepareListAgentSessionsArguments(
ref long? limit,
ref global::tryAGI.OpenAI.ListOrderParam? order,
ref string? after,
ref string? agentId);
ref string? agentId,
global::System.Collections.Generic.Dictionary<string, string>? metadata);
partial void PrepareListAgentSessionsRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
long? limit,
global::tryAGI.OpenAI.ListOrderParam? order,
string? after,
string? agentId);
string? agentId,
global::System.Collections.Generic.Dictionary<string, string>? metadata);
partial void ProcessListAgentSessionsResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -60,6 +62,7 @@ partial void ProcessListAgentSessionsResponseContent(
/// </param>
/// <param name="after"></param>
/// <param name="agentId"></param>
/// <param name="metadata"></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::tryAGI.OpenAI.ApiException"></exception>
Expand All @@ -68,6 +71,7 @@ partial void ProcessListAgentSessionsResponseContent(
global::tryAGI.OpenAI.ListOrderParam? order = default,
string? after = default,
string? agentId = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
global::tryAGI.OpenAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -76,6 +80,7 @@ partial void ProcessListAgentSessionsResponseContent(
order: order,
after: after,
agentId: agentId,
metadata: metadata,
requestOptions: requestOptions,
cancellationToken: cancellationToken
).ConfigureAwait(false);
Expand All @@ -95,6 +100,7 @@ partial void ProcessListAgentSessionsResponseContent(
/// </param>
/// <param name="after"></param>
/// <param name="agentId"></param>
/// <param name="metadata"></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::tryAGI.OpenAI.ApiException"></exception>
Expand All @@ -103,6 +109,7 @@ partial void ProcessListAgentSessionsResponseContent(
global::tryAGI.OpenAI.ListOrderParam? order = default,
string? after = default,
string? agentId = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
global::tryAGI.OpenAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -115,7 +122,8 @@ partial void ProcessListAgentSessionsResponseContent(
limit: ref limit,
order: ref order,
after: ref after,
agentId: ref agentId);
agentId: ref agentId,
metadata: metadata);


var __authorizations = global::tryAGI.OpenAI.EndPointSecurityResolver.ResolveAuthorizations(
Expand Down Expand Up @@ -148,6 +156,7 @@ partial void ProcessListAgentSessionsResponseContent(
.AddOptionalParameter("order", order?.ToValueString())
.AddOptionalParameter("after", after)
.AddOptionalParameter("agent_id", agentId)
.AddOptionalParameter("metadata", metadata?.ToString())
;
var __path = __pathBuilder.ToString();
__path = global::tryAGI.OpenAI.AutoSDKRequestOptionsSupport.AppendQueryParameters(
Expand Down Expand Up @@ -192,7 +201,8 @@ partial void ProcessListAgentSessionsResponseContent(
limit: limit,
order: order,
after: after,
agentId: agentId);
agentId: agentId,
metadata: metadata);

return __httpRequest;
}
Expand Down Expand Up @@ -738,12 +748,14 @@ partial void ProcessListAgentSessionsResponseContent(
/// Default Value: desc
/// </param>
/// <param name="agentId"></param>
/// <param name="metadata"></param>
/// <param name="after">Initial cursor to start enumerating from. Defaults to null (first page).</param>
/// <param name="cancellationToken"></param>
public global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.SessionResource> ListAgentSessionsAutoPagingAsync(
long? limit = default,
global::tryAGI.OpenAI.ListOrderParam? order = default,
string? agentId = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
string? after = null,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -753,6 +765,7 @@ partial void ProcessListAgentSessionsResponseContent(
order: order,
after: __cursor,
agentId: agentId,
metadata: metadata,
cancellationToken: __ct),
extractItems: static __response => __response is null
? null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public partial interface IAgentsClient
/// </param>
/// <param name="after"></param>
/// <param name="agentId"></param>
/// <param name="metadata"></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::tryAGI.OpenAI.ApiException"></exception>
Expand All @@ -25,6 +26,7 @@ public partial interface IAgentsClient
global::tryAGI.OpenAI.ListOrderParam? order = default,
string? after = default,
string? agentId = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
global::tryAGI.OpenAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
Expand All @@ -40,6 +42,7 @@ public partial interface IAgentsClient
/// </param>
/// <param name="after"></param>
/// <param name="agentId"></param>
/// <param name="metadata"></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::tryAGI.OpenAI.ApiException"></exception>
Expand All @@ -48,6 +51,7 @@ public partial interface IAgentsClient
global::tryAGI.OpenAI.ListOrderParam? order = default,
string? after = default,
string? agentId = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
global::tryAGI.OpenAI.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);

Expand All @@ -62,12 +66,14 @@ public partial interface IAgentsClient
/// Default Value: desc
/// </param>
/// <param name="agentId"></param>
/// <param name="metadata"></param>
/// <param name="after">Initial cursor to start enumerating from. Defaults to null (first page).</param>
/// <param name="cancellationToken"></param>
global::System.Collections.Generic.IAsyncEnumerable<global::tryAGI.OpenAI.SessionResource> ListAgentSessionsAutoPagingAsync(
long? limit = default,
global::tryAGI.OpenAI.ListOrderParam? order = default,
string? agentId = default,
global::System.Collections.Generic.Dictionary<string, string>? metadata = default,
string? after = null,
global::System.Threading.CancellationToken cancellationToken = default);

Expand Down

Large diffs are not rendered by default.

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

namespace tryAGI.OpenAI
{
public sealed partial class ListAgentSessionsMetadata
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerContext.Options.GetTypeInfo(this.GetType()));
}

/// <summary>
/// Serializes the current instance to a JSON string using the generated default JsonSerializerContext.
/// </summary>
public string ToJson()
{
return ToJson(global::tryAGI.OpenAI.SourceGenerationContextComponent_FFCAD88709F0F6EB.Default);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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)
{
if (jsonSerializerOptions is null)
{
return ToJson(global::tryAGI.OpenAI.SourceGenerationContextComponent_FFCAD88709F0F6EB.Default);
}

return global::System.Text.Json.JsonSerializer.Serialize(
this,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::tryAGI.OpenAI.ListAgentSessionsMetadata? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerContext.Options.GetTypeInfo(typeof(global::tryAGI.OpenAI.ListAgentSessionsMetadata))) as global::tryAGI.OpenAI.ListAgentSessionsMetadata;
}

/// <summary>
/// Deserializes a JSON string using the generated default JsonSerializerContext.
/// </summary>
public static global::tryAGI.OpenAI.ListAgentSessionsMetadata? FromJson(
string json)
{
return FromJson(
json,
global::tryAGI.OpenAI.SourceGenerationContextComponent_FFCAD88709F0F6EB.Default);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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::tryAGI.OpenAI.ListAgentSessionsMetadata? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return FromJson(
json,
global::tryAGI.OpenAI.SourceGenerationContextComponent_FFCAD88709F0F6EB.Default);
}

return global::System.Text.Json.JsonSerializer.Deserialize<global::tryAGI.OpenAI.ListAgentSessionsMetadata>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::tryAGI.OpenAI.ListAgentSessionsMetadata?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerContext.Options.GetTypeInfo(typeof(global::tryAGI.OpenAI.ListAgentSessionsMetadata))).ConfigureAwait(false)) as global::tryAGI.OpenAI.ListAgentSessionsMetadata;
}

/// <summary>
/// Deserializes a JSON stream using the generated default JsonSerializerContext.
/// </summary>
public static global::System.Threading.Tasks.ValueTask<global::tryAGI.OpenAI.ListAgentSessionsMetadata?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream)
{
return FromJsonStreamAsync(
jsonStream,
global::tryAGI.OpenAI.SourceGenerationContextComponent_FFCAD88709F0F6EB.Default);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#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<global::tryAGI.OpenAI.ListAgentSessionsMetadata?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
if (jsonSerializerOptions is null)
{
return FromJsonStreamAsync(
jsonStream,
global::tryAGI.OpenAI.SourceGenerationContextComponent_FFCAD88709F0F6EB.Default);
}

return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::tryAGI.OpenAI.ListAgentSessionsMetadata?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

#nullable enable

namespace tryAGI.OpenAI
{
/// <summary>
///
/// </summary>
public sealed partial class ListAgentSessionsMetadata
{

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private sealed partial class SharedMetadataResolver : global::System.Text.Json.S
{
if (type == typeof(global::tryAGI.OpenAI.OpenAIFile))
{
return global::tryAGI.OpenAI.SourceGenerationContextMetadata0FactoryBatch0372.Create_OpenAIFile(options);
return global::tryAGI.OpenAI.SourceGenerationContextMetadata0FactoryBatch0373.Create_OpenAIFile(options);
}
global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? additional = null;
ResolveAdditionalTypeInfo(type, options, ref additional);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private sealed partial class SharedMetadataResolver : global::System.Text.Json.S
}
if (type == typeof(global::tryAGI.OpenAI.BetaImageGenToolCallQuality?))
{
return global::tryAGI.OpenAI.SourceGenerationContextMetadata0FactoryBatch0225.Create_NullableBetaImageGenToolCallQuality2(options);
return global::tryAGI.OpenAI.SourceGenerationContextMetadata0FactoryBatch0226.Create_NullableBetaImageGenToolCallQuality2(options);
}
global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? additional = null;
ResolveAdditionalTypeInfo(type, options, ref additional);
Expand Down
Loading
Loading