Skip to content

Commit

Permalink
Merge pull request #5 from tryAGI/bot/update-openapi_202410081522
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 8, 2024
2 parents 88e328e + b24c949 commit aee0dba
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
7 changes: 6 additions & 1 deletion src/libs/Vectara/Generated/JsonConverters.UnixTimestamp.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ public class UnixTimestampJsonConverter : global::System.Text.Json.Serialization
{
if (reader.TryGetInt64(out long unixTimestamp))
{
return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestamp);
if (unixTimestamp >= -62135596800L && unixTimestamp <= 253402300799L)
{
return global::System.DateTimeOffset.FromUnixTimeSeconds(unixTimestamp);
}

return global::System.DateTimeOffset.FromUnixTimeMilliseconds(unixTimestamp);
}
if (reader.TryGetInt32(out int unixTimestampInt))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,11 @@ public partial interface IUploadClient
/// <param name="file">
/// Binary file contents. The file name of the file will be used as the document ID.
/// </param>
/// <param name="requestFilename">
/// Binary file contents. The file name of the file will be used as the document ID.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Vectara.Document> UploadFileAsync(
string corpusKey,
byte[] file,
string requestFilename,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
global::Vectara.UploadFileRequestMetadata? metadata = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ public sealed partial class UploadFileRequest
[global::System.Text.Json.Serialization.JsonRequired]
public required byte[] File { get; set; }

/// <summary>
/// Binary file contents. The file name of the file will be used as the document ID.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("filename")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Filename { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,11 @@ partial void ProcessUploadFileResponseContent(
/// <param name="file">
/// Binary file contents. The file name of the file will be used as the document ID.
/// </param>
/// <param name="requestFilename">
/// Binary file contents. The file name of the file will be used as the document ID.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Vectara.Document> UploadFileAsync(
string corpusKey,
byte[] file,
string requestFilename,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
global::Vectara.UploadFileRequestMetadata? metadata = default,
Expand All @@ -228,7 +224,6 @@ partial void ProcessUploadFileResponseContent(
Metadata = metadata,
Filename = filename,
File = file,
Filename = requestFilename,
};

return await UploadFileAsync(
Expand Down

0 comments on commit aee0dba

Please sign in to comment.