Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and HavenDV committed Jul 20, 2024
1 parent 936cac0 commit bd04ee8
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ partial void ProcessCreateChatCompletionResponseContent(
/// Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:<br/>
/// - If set to 'auto', the system will utilize scale tier credits until they are exhausted.<br/>
/// - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.<br/>
/// - When not set, the default behavior is 'auto'.<br/>
/// When this parameter is set, the response body will include the `service_tier` utilized.
/// </param>
/// <param name="stop">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public sealed partial class CreateChatCompletionRequest
/// Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:<br/>
/// - If set to 'auto', the system will utilize scale tier credits until they are exhausted.<br/>
/// - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.<br/>
/// - When not set, the default behavior is 'auto'.<br/>
/// When this parameter is set, the response body will include the `service_tier` utilized.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("service_tier")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace OpenAI
/// Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service:<br/>
/// - If set to 'auto', the system will utilize scale tier credits until they are exhausted.<br/>
/// - If set to 'default', the request will be processed using the default service tier with a lower uptime SLA and no latency guarentee.<br/>
/// - When not set, the default behavior is 'auto'.<br/>
/// When this parameter is set, the response body will include the `service_tier` utilized.
/// </summary>
public enum CreateChatCompletionRequestServiceTier
Expand Down
3 changes: 1 addition & 2 deletions src/libs/OpenAI/Generated/OpenAI.Models.Upload.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ public sealed partial class Upload
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("object")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.UploadObjectJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::OpenAI.UploadObject Object { get; set; }
public global::OpenAI.UploadObject? Object { get; set; }

/// <summary>
/// The `File` object represents a document that has been uploaded to OpenAI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ public enum VectorStoreFileObjectLastErrorCode
/// <summary>
///
/// </summary>
ServerError,
InternalError,
/// <summary>
///
/// </summary>
UnsupportedFile,
FileNotFound,
/// <summary>
///
/// </summary>
InvalidFile,
ParsingError,
/// <summary>
///
/// </summary>
UnhandledMimeType,
}

/// <summary>
Expand All @@ -34,9 +38,10 @@ public static string ToValueString(this VectorStoreFileObjectLastErrorCode value
{
return value switch
{
VectorStoreFileObjectLastErrorCode.ServerError => "server_error",
VectorStoreFileObjectLastErrorCode.UnsupportedFile => "unsupported_file",
VectorStoreFileObjectLastErrorCode.InvalidFile => "invalid_file",
VectorStoreFileObjectLastErrorCode.InternalError => "internal_error",
VectorStoreFileObjectLastErrorCode.FileNotFound => "file_not_found",
VectorStoreFileObjectLastErrorCode.ParsingError => "parsing_error",
VectorStoreFileObjectLastErrorCode.UnhandledMimeType => "unhandled_mime_type",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
Expand All @@ -47,9 +52,10 @@ public static string ToValueString(this VectorStoreFileObjectLastErrorCode value
{
return value switch
{
"server_error" => VectorStoreFileObjectLastErrorCode.ServerError,
"unsupported_file" => VectorStoreFileObjectLastErrorCode.UnsupportedFile,
"invalid_file" => VectorStoreFileObjectLastErrorCode.InvalidFile,
"internal_error" => VectorStoreFileObjectLastErrorCode.InternalError,
"file_not_found" => VectorStoreFileObjectLastErrorCode.FileNotFound,
"parsing_error" => VectorStoreFileObjectLastErrorCode.ParsingError,
"unhandled_mime_type" => VectorStoreFileObjectLastErrorCode.UnhandledMimeType,
_ => null,
};
}
Expand Down
Loading

0 comments on commit bd04ee8

Please sign in to comment.