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
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@ namespace tryAGI.OpenAI
typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<int?, global::tryAGI.OpenAI.RealtimeSessionCreateRequestMaxResponseOutputTokens?>),
typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<global::tryAGI.OpenAI.RealtimeSessionCreateRequestTracingEnum?, global::tryAGI.OpenAI.RealtimeSessionCreateRequestTracingEnum2>),
typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<int?, global::tryAGI.OpenAI.RealtimeSessionMaxOutputTokens?>),
typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<global::tryAGI.OpenAI.TranscriptTextUsageTokens, global::tryAGI.OpenAI.TranscriptTextUsageDuration>),
typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<int?, global::tryAGI.OpenAI.RealtimeSessionCreateResponseMaxResponseOutputTokens?>),
typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<global::tryAGI.OpenAI.RealtimeSessionCreateResponseTracingEnum?, global::tryAGI.OpenAI.RealtimeSessionCreateResponseTracingEnum2>),
typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<string, global::System.Collections.Generic.IList<global::tryAGI.OpenAI.InputItem>>),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ public sealed partial class InputFileContent
[global::System.Text.Json.Serialization.JsonPropertyName("file_id")]
public string? FileId { get; set; }

/// <summary>
/// The URL of the file to be sent to the model.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("file_url")]
public string? FileUrl { get; set; }

/// <summary>
/// The name of the file to be sent to the model.
/// </summary>
Expand Down Expand Up @@ -50,6 +56,9 @@ public sealed partial class InputFileContent
/// <param name="fileId">
/// The ID of the file to be sent to the model.
/// </param>
/// <param name="fileUrl">
/// The URL of the file to be sent to the model.
/// </param>
/// <param name="filename">
/// The name of the file to be sent to the model.
/// </param>
Expand All @@ -63,11 +72,13 @@ public sealed partial class InputFileContent
public InputFileContent(
string? fileData,
string? fileId,
string? fileUrl,
string? filename,
global::tryAGI.OpenAI.InputFileContentType type = global::tryAGI.OpenAI.InputFileContentType.InputFile)
{
this.FileData = fileData;
this.FileId = fileId;
this.FileUrl = fileUrl;
this.Filename = filename;
this.Type = type;
}
Expand Down
11 changes: 11 additions & 0 deletions src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MCPTool.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public sealed partial class MCPTool
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<global::tryAGI.OpenAI.MCPToolRequireApprovalEnum, global::tryAGI.OpenAI.MCPToolRequireApprovalEnum2?>))]
public global::tryAGI.OpenAI.OneOf<global::tryAGI.OpenAI.MCPToolRequireApprovalEnum, global::tryAGI.OpenAI.MCPToolRequireApprovalEnum2?>? RequireApproval { get; set; }

/// <summary>
/// Optional description of the MCP server, used to provide more context.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("server_description")]
public string? ServerDescription { get; set; }

/// <summary>
/// A label for this MCP server, used to identify it in tool calls.
/// </summary>
Expand Down Expand Up @@ -74,6 +80,9 @@ public sealed partial class MCPTool
/// Specify which of the MCP server's tools require approval.<br/>
/// Default Value: always
/// </param>
/// <param name="serverDescription">
/// Optional description of the MCP server, used to provide more context.
/// </param>
/// <param name="serverLabel">
/// A label for this MCP server, used to identify it in tool calls.
/// </param>
Expand All @@ -92,13 +101,15 @@ public MCPTool(
global::tryAGI.OpenAI.OneOf<global::System.Collections.Generic.IList<string>, global::tryAGI.OpenAI.MCPToolAllowedTools>? allowedTools,
global::System.Collections.Generic.Dictionary<string, string>? headers,
global::tryAGI.OpenAI.OneOf<global::tryAGI.OpenAI.MCPToolRequireApprovalEnum, global::tryAGI.OpenAI.MCPToolRequireApprovalEnum2?>? requireApproval,
string? serverDescription,
global::tryAGI.OpenAI.MCPToolType type)
{
this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel));
this.ServerUrl = serverUrl ?? throw new global::System.ArgumentNullException(nameof(serverUrl));
this.AllowedTools = allowedTools;
this.Headers = headers;
this.RequireApproval = requireApproval;
this.ServerDescription = serverDescription;
this.Type = type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public sealed partial class OpenAIFile
public global::tryAGI.OpenAI.OpenAIFileObject Object { get; set; }

/// <summary>
/// The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.
/// The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("purpose")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OpenAIFilePurposeJsonConverter))]
Expand Down Expand Up @@ -102,7 +102,7 @@ public sealed partial class OpenAIFile
/// The object type, which is always `file`.
/// </param>
/// <param name="purpose">
/// The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.
/// The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.
/// </param>
/// <param name="status">
/// Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace tryAGI.OpenAI
{
/// <summary>
/// The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results` and `vision`.
/// The intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.
/// </summary>
public enum OpenAIFilePurpose
{
Expand Down Expand Up @@ -36,6 +36,10 @@ public enum OpenAIFilePurpose
///
/// </summary>
Vision,
/// <summary>
///
/// </summary>
UserData,
}

/// <summary>
Expand All @@ -57,6 +61,7 @@ public static string ToValueString(this OpenAIFilePurpose value)
OpenAIFilePurpose.FineTune => "fine-tune",
OpenAIFilePurpose.FineTuneResults => "fine-tune-results",
OpenAIFilePurpose.Vision => "vision",
OpenAIFilePurpose.UserData => "user_data",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -74,6 +79,7 @@ public static string ToValueString(this OpenAIFilePurpose value)
"fine-tune" => OpenAIFilePurpose.FineTune,
"fine-tune-results" => OpenAIFilePurpose.FineTuneResults,
"vision" => OpenAIFilePurpose.Vision,
"user_data" => OpenAIFilePurpose.UserData,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace tryAGI.OpenAI
{
/// <summary>
/// This event is the output of audio transcription for user audio written to the <br/>
/// user audio buffer. Transcription begins when the input audio buffer is <br/>
/// committed by the client or server (in `server_vad` mode). Transcription runs <br/>
/// asynchronously with Response creation, so this event may come before or after <br/>
/// This event is the output of audio transcription for user audio written to the<br/>
/// user audio buffer. Transcription begins when the input audio buffer is<br/>
/// committed by the client or server (in `server_vad` mode). Transcription runs<br/>
/// asynchronously with Response creation, so this event may come before or after<br/>
/// the Response events.<br/>
/// Realtime API models accept audio natively, and thus input transcription is a<br/>
/// separate process run on a separate ASR (Automatic Speech Recognition) model.<br/>
Expand Down Expand Up @@ -58,6 +60,14 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeJsonConverter))]
public global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType Type { get; set; }

/// <summary>
/// Usage statistics for the transcription.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("usage")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.OneOfJsonConverter<global::tryAGI.OpenAI.TranscriptTextUsageTokens, global::tryAGI.OpenAI.TranscriptTextUsageDuration>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::tryAGI.OpenAI.OneOf<global::tryAGI.OpenAI.TranscriptTextUsageTokens, global::tryAGI.OpenAI.TranscriptTextUsageDuration> Usage { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -86,6 +96,9 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr
/// The event type, must be<br/>
/// `conversation.item.input_audio_transcription.completed`.
/// </param>
/// <param name="usage">
/// Usage statistics for the transcription.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -94,13 +107,15 @@ public RealtimeServerEventConversationItemInputAudioTranscriptionCompleted(
string eventId,
string itemId,
string transcript,
global::tryAGI.OpenAI.OneOf<global::tryAGI.OpenAI.TranscriptTextUsageTokens, global::tryAGI.OpenAI.TranscriptTextUsageDuration> usage,
global::System.Collections.Generic.IList<global::tryAGI.OpenAI.LogProbProperties>? logprobs,
global::tryAGI.OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType type)
{
this.ContentIndex = contentIndex;
this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId));
this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId));
this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript));
this.Usage = usage;
this.Logprobs = logprobs;
this.Type = type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public sealed partial class ResponseMCPCallArgumentsDeltaEvent
public required int SequenceNumber { get; set; }

/// <summary>
/// The type of the event. Always 'response.mcp_call.arguments_delta'.
/// The type of the event. Always 'response.mcp_call_arguments.delta'.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallArgumentsDeltaEventTypeJsonConverter))]
Expand Down Expand Up @@ -65,7 +65,7 @@ public sealed partial class ResponseMCPCallArgumentsDeltaEvent
/// The sequence number of this event.
/// </param>
/// <param name="type">
/// The type of the event. Always 'response.mcp_call.arguments_delta'.
/// The type of the event. Always 'response.mcp_call_arguments.delta'.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace tryAGI.OpenAI
{
/// <summary>
/// The type of the event. Always 'response.mcp_call.arguments_delta'.
/// The type of the event. Always 'response.mcp_call_arguments.delta'.
/// </summary>
public enum ResponseMCPCallArgumentsDeltaEventType
{
Expand All @@ -26,7 +26,7 @@ public static string ToValueString(this ResponseMCPCallArgumentsDeltaEventType v
{
return value switch
{
ResponseMCPCallArgumentsDeltaEventType.ResponseMcpCallArgumentsDelta => "response.mcp_call.arguments_delta",
ResponseMCPCallArgumentsDeltaEventType.ResponseMcpCallArgumentsDelta => "response.mcp_call_arguments.delta",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -37,7 +37,7 @@ public static string ToValueString(this ResponseMCPCallArgumentsDeltaEventType v
{
return value switch
{
"response.mcp_call.arguments_delta" => ResponseMCPCallArgumentsDeltaEventType.ResponseMcpCallArgumentsDelta,
"response.mcp_call_arguments.delta" => ResponseMCPCallArgumentsDeltaEventType.ResponseMcpCallArgumentsDelta,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public sealed partial class ResponseMCPCallArgumentsDoneEvent
public required int SequenceNumber { get; set; }

/// <summary>
/// The type of the event. Always 'response.mcp_call.arguments_done'.
/// The type of the event. Always 'response.mcp_call_arguments.done'.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseMCPCallArgumentsDoneEventTypeJsonConverter))]
Expand Down Expand Up @@ -65,7 +65,7 @@ public sealed partial class ResponseMCPCallArgumentsDoneEvent
/// The sequence number of this event.
/// </param>
/// <param name="type">
/// The type of the event. Always 'response.mcp_call.arguments_done'.
/// The type of the event. Always 'response.mcp_call_arguments.done'.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace tryAGI.OpenAI
{
/// <summary>
/// The type of the event. Always 'response.mcp_call.arguments_done'.
/// The type of the event. Always 'response.mcp_call_arguments.done'.
/// </summary>
public enum ResponseMCPCallArgumentsDoneEventType
{
Expand All @@ -26,7 +26,7 @@ public static string ToValueString(this ResponseMCPCallArgumentsDoneEventType va
{
return value switch
{
ResponseMCPCallArgumentsDoneEventType.ResponseMcpCallArgumentsDone => "response.mcp_call.arguments_done",
ResponseMCPCallArgumentsDoneEventType.ResponseMcpCallArgumentsDone => "response.mcp_call_arguments.done",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -37,7 +37,7 @@ public static string ToValueString(this ResponseMCPCallArgumentsDoneEventType va
{
return value switch
{
"response.mcp_call.arguments_done" => ResponseMCPCallArgumentsDoneEventType.ResponseMcpCallArgumentsDone,
"response.mcp_call_arguments.done" => ResponseMCPCallArgumentsDoneEventType.ResponseMcpCallArgumentsDone,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public sealed partial class ResponseOutputTextAnnotationAddedEvent
public required int SequenceNumber { get; set; }

/// <summary>
/// The type of the event. Always 'response.output_text_annotation.added'.
/// The type of the event. Always 'response.output_text.annotation.added'.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.ResponseOutputTextAnnotationAddedEventTypeJsonConverter))]
Expand Down Expand Up @@ -85,7 +85,7 @@ public sealed partial class ResponseOutputTextAnnotationAddedEvent
/// The sequence number of this event.
/// </param>
/// <param name="type">
/// The type of the event. Always 'response.output_text_annotation.added'.
/// The type of the event. Always 'response.output_text.annotation.added'.
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace tryAGI.OpenAI
{
/// <summary>
/// The type of the event. Always 'response.output_text_annotation.added'.
/// The type of the event. Always 'response.output_text.annotation.added'.
/// </summary>
public enum ResponseOutputTextAnnotationAddedEventType
{
Expand All @@ -26,7 +26,7 @@ public static string ToValueString(this ResponseOutputTextAnnotationAddedEventTy
{
return value switch
{
ResponseOutputTextAnnotationAddedEventType.ResponseOutputTextAnnotationAdded => "response.output_text_annotation.added",
ResponseOutputTextAnnotationAddedEventType.ResponseOutputTextAnnotationAdded => "response.output_text.annotation.added",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -37,7 +37,7 @@ public static string ToValueString(this ResponseOutputTextAnnotationAddedEventTy
{
return value switch
{
"response.output_text_annotation.added" => ResponseOutputTextAnnotationAddedEventType.ResponseOutputTextAnnotationAdded,
"response.output_text.annotation.added" => ResponseOutputTextAnnotationAddedEventType.ResponseOutputTextAnnotationAdded,
_ => null,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public sealed partial class TranscriptTextUsageDuration
/// <summary>
/// Duration of the input audio in seconds.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("duration")]
[global::System.Text.Json.Serialization.JsonPropertyName("seconds")]
[global::System.Text.Json.Serialization.JsonRequired]
public required double Duration { get; set; }
public required double Seconds { get; set; }

/// <summary>
/// The type of the usage object. Always `duration` for this variant.
Expand All @@ -31,7 +31,7 @@ public sealed partial class TranscriptTextUsageDuration
/// <summary>
/// Initializes a new instance of the <see cref="TranscriptTextUsageDuration" /> class.
/// </summary>
/// <param name="duration">
/// <param name="seconds">
/// Duration of the input audio in seconds.
/// </param>
/// <param name="type">
Expand All @@ -41,10 +41,10 @@ public sealed partial class TranscriptTextUsageDuration
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public TranscriptTextUsageDuration(
double duration,
double seconds,
global::tryAGI.OpenAI.TranscriptTextUsageDurationType type)
{
this.Duration = duration;
this.Seconds = seconds;
this.Type = type;
}

Expand Down
Loading