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 20, 2024
1 parent 5f15e9f commit 348b24c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ public partial interface IJambaCompleteClient
/// <param name="requestStartTime">
/// Default Value: 1730898900272
/// </param>
/// <param name="authorization"></param>
/// <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.AnyOf<global::AI21.ChatCompletion, global::System.Collections.Generic.IList<global::AI21.ChatCompletionVllmStreamingMessage>>> V1ChatCompleteAsync(
string authorization,
global::AI21.ChatRequest request,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand All @@ -36,7 +34,6 @@ public partial interface IJambaCompleteClient
/// <param name="requestStartTime">
/// Default Value: 1730898900272
/// </param>
/// <param name="authorization"></param>
/// <param name="model">
/// An enumeration.
/// </param>
Expand Down Expand Up @@ -94,7 +91,6 @@ public partial interface IJambaCompleteClient
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::AI21.AnyOf<global::AI21.ChatCompletion, global::System.Collections.Generic.IList<global::AI21.ChatCompletionVllmStreamingMessage>>> V1ChatCompleteAsync(
string authorization,
global::AI21.ModelName model,
global::System.Collections.Generic.IList<global::AI21.MessagesItem> messages,
int? requestStartTime = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ public partial class JambaCompleteClient
partial void PrepareV1ChatCompleteArguments(
global::System.Net.Http.HttpClient httpClient,
ref int? requestStartTime,
ref string authorization,
global::AI21.ChatRequest request);
partial void PrepareV1ChatCompleteRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
int? requestStartTime,
string authorization,
global::AI21.ChatRequest request);
partial void ProcessV1ChatCompleteResponse(
global::System.Net.Http.HttpClient httpClient,
Expand All @@ -36,12 +34,10 @@ partial void ProcessV1ChatCompleteResponseContent(
/// <param name="requestStartTime">
/// Default Value: 1730898900272
/// </param>
/// <param name="authorization"></param>
/// <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.AnyOf<global::AI21.ChatCompletion, global::System.Collections.Generic.IList<global::AI21.ChatCompletionVllmStreamingMessage>>> V1ChatCompleteAsync(
string authorization,
global::AI21.ChatRequest request,
int? requestStartTime = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand All @@ -53,7 +49,6 @@ partial void ProcessV1ChatCompleteResponseContent(
PrepareV1ChatCompleteArguments(
httpClient: HttpClient,
requestStartTime: ref requestStartTime,
authorization: ref authorization,
request: request);

var __pathBuilder = new PathBuilder(
Expand Down Expand Up @@ -82,9 +77,6 @@ partial void ProcessV1ChatCompleteResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}

__httpRequest.Headers.TryAddWithoutValidation("Authorization", authorization.ToString());

var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
Expand All @@ -99,7 +91,6 @@ partial void ProcessV1ChatCompleteResponseContent(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
requestStartTime: requestStartTime,
authorization: authorization,
request: request);

using var __response = await HttpClient.SendAsync(
Expand Down Expand Up @@ -217,7 +208,6 @@ partial void ProcessV1ChatCompleteResponseContent(
/// <param name="requestStartTime">
/// Default Value: 1730898900272
/// </param>
/// <param name="authorization"></param>
/// <param name="model">
/// An enumeration.
/// </param>
Expand Down Expand Up @@ -275,7 +265,6 @@ partial void ProcessV1ChatCompleteResponseContent(
/// <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.AnyOf<global::AI21.ChatCompletion, global::System.Collections.Generic.IList<global::AI21.ChatCompletionVllmStreamingMessage>>> V1ChatCompleteAsync(
string authorization,
global::AI21.ModelName model,
global::System.Collections.Generic.IList<global::AI21.MessagesItem> messages,
int? requestStartTime = default,
Expand Down Expand Up @@ -309,7 +298,6 @@ partial void ProcessV1ChatCompleteResponseContent(

return await V1ChatCompleteAsync(
requestStartTime: requestStartTime,
authorization: authorization,
request: __request,
cancellationToken: cancellationToken).ConfigureAwait(false);
}
Expand Down
6 changes: 0 additions & 6 deletions src/libs/AI21/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ paths:
title: Request Start Time
type: integer
default: '1730898900272'
- name: Authorization
in: header
required: true
schema:
title: Authorization
type: string
requestBody:
content:
application/json:
Expand Down

0 comments on commit 348b24c

Please sign in to comment.