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] committed Nov 13, 2024
1 parent e869d3f commit 69e7165
Show file tree
Hide file tree
Showing 37 changed files with 256 additions and 2,225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public partial interface ILibraryManagementClient
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
global::System.Threading.Tasks.Task<global::AI21.FileDeleteResponse> V1LibraryDeleteAsync(
global::System.Threading.Tasks.Task<string> V1LibraryDeleteAsync(
global::System.Guid fileId,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public partial interface ILibraryManagementClient
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
global::System.Threading.Tasks.Task<global::AI21.FileUploadResponse> V1LibraryUploadAsync(
global::System.Threading.Tasks.Task<string> V1LibraryUploadAsync(
global::AI21.BodyV1LibraryUpload request,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand All @@ -44,7 +44,7 @@ public partial interface ILibraryManagementClient
/// <param name="customConfigs"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::AI21.FileUploadResponse> V1LibraryUploadAsync(
global::System.Threading.Tasks.Task<string> V1LibraryUploadAsync(
byte[] file,
string filename,
int? requestStartTime = default,
Expand Down
65 changes: 0 additions & 65 deletions src/libs/AI21/Generated/AI21.IRAGEngineClient.V1LibraryAnswer.g.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public partial interface IRAGEngineClient
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
global::System.Threading.Tasks.Task<global::AI21.LibrarySearchResponse> V1LibrarySearchAsync(
global::System.Threading.Tasks.Task<string> V1LibrarySearchAsync(
global::AI21.LibrarySearchRequest request,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down Expand Up @@ -43,7 +43,7 @@ public partial interface IRAGEngineClient
/// <param name="hybridSearchAlpha"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::AI21.LibrarySearchResponse> V1LibrarySearchAsync(
global::System.Threading.Tasks.Task<string> V1LibrarySearchAsync(
string query,
int? requestStartTime = default,
int? maxSegments = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ partial void ProcessV1LibraryDeleteResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::AI21.FileDeleteResponse> V1LibraryDeleteAsync(
public async global::System.Threading.Tasks.Task<string> V1LibraryDeleteAsync(
global::System.Guid fileId,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -155,9 +155,7 @@ partial void ProcessV1LibraryDeleteResponseContent(
};
}

return
global::AI21.FileDeleteResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
return __content;
}
else
{
Expand All @@ -181,7 +179,7 @@ partial void ProcessV1LibraryDeleteResponseContent(

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AI21.FileDeleteResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;

return
__responseValue ??
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ partial void ProcessV1LibraryUploadResponseContent(
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::AI21.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::AI21.FileUploadResponse> V1LibraryUploadAsync(
public async global::System.Threading.Tasks.Task<string> V1LibraryUploadAsync(
global::AI21.BodyV1LibraryUpload request,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -196,9 +196,7 @@ partial void ProcessV1LibraryUploadResponseContent(
};
}

return
global::AI21.FileUploadResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
return __content;
}
else
{
Expand All @@ -222,7 +220,7 @@ partial void ProcessV1LibraryUploadResponseContent(

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::AI21.FileUploadResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;

return
__responseValue ??
Expand Down Expand Up @@ -250,7 +248,7 @@ partial void ProcessV1LibraryUploadResponseContent(
/// <param name="customConfigs"></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::AI21.FileUploadResponse> V1LibraryUploadAsync(
public async global::System.Threading.Tasks.Task<string> V1LibraryUploadAsync(
byte[] file,
string filename,
int? requestStartTime = default,
Expand Down
57 changes: 0 additions & 57 deletions src/libs/AI21/Generated/AI21.Models.AnswerLength.g.cs

This file was deleted.

60 changes: 0 additions & 60 deletions src/libs/AI21/Generated/AI21.Models.FileDeleteResponse.g.cs

This file was deleted.

64 changes: 0 additions & 64 deletions src/libs/AI21/Generated/AI21.Models.FileUploadResponse.g.cs

This file was deleted.

Loading

0 comments on commit 69e7165

Please sign in to comment.