Skip to content

Commit

Permalink
Merge pull request #71 from tryAGI/bot/update-openapi_202411131828
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 13, 2024
2 parents 936afaf + 2611de2 commit 1ba8c02
Show file tree
Hide file tree
Showing 42 changed files with 109 additions and 261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ partial void ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponseConte
};
}

return __content;
return __content;
}
else
{
Expand All @@ -187,13 +187,9 @@ partial void ProcessConvertDocumentFileStudioV1ChatFilesConvertPostResponseConte
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,10 @@ partial void ProcessGenerateOrgTokenStudioV1ConnectorsConnectedUsersOrganization
};
}

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

var __responseValue = await global::AI21.ConnectorsToken.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AI21.ConnectorsToken.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,10 @@ partial void ProcessGetDataSourceStatusStudioV1ConnectorsConnectedUsersOrganizat
};
}

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

var __responseValue = await global::AI21.ConnectorsStatus.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AI21.ConnectorsStatus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,10 @@ partial void ProcessGetOrgDataSourcesInfoStudioV1ConnectorsConnectedUsersOrganiz
};
}

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

var __responseValue = await global::AI21.ConnectorsDataSources.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AI21.ConnectorsDataSources.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,10 @@ partial void ProcessV1ConversationalRagResponseContent(
};
}

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

var __responseValue = await global::AI21.ConversationalRagResult.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AI21.ConversationalRagResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/libs/AI21/Generated/AI21.ChatClient.V1J2UltraChat.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,10 @@ partial void ProcessV1J2UltraChatResponseContent(
};
}

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

var __responseValue = await global::AI21.ChatResponse.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::AI21.ChatResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessV1J2GrandeCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -191,13 +191,9 @@ partial void ProcessV1J2GrandeCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ partial void ProcessV1J2GrandeCustomModelCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -197,13 +197,9 @@ partial void ProcessV1J2GrandeCustomModelCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessV1J2GrandeInstructCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -191,13 +191,9 @@ partial void ProcessV1J2GrandeInstructCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessV1J2JumboCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -191,13 +191,9 @@ partial void ProcessV1J2JumboCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ partial void ProcessV1J2JumboComplete2ResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -197,13 +197,9 @@ partial void ProcessV1J2JumboComplete2ResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessV1J2JumboInstructCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -191,13 +191,9 @@ partial void ProcessV1J2JumboInstructCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessV1J2LargeCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -191,13 +191,9 @@ partial void ProcessV1J2LargeCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ partial void ProcessV1J2LargeCustomModelCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -197,13 +197,9 @@ partial void ProcessV1J2LargeCustomModelCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessV1J2LargeInstructCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -191,13 +191,9 @@ partial void ProcessV1J2LargeInstructCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessV1J2LightCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -191,13 +191,9 @@ partial void ProcessV1J2LightCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ partial void ProcessV1J2LightCustomModelCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -197,13 +197,9 @@ partial void ProcessV1J2LightCustomModelCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ partial void ProcessV1J2MidCompleteResponseContent(
};
}

return __content;
return __content;
}
else
{
Expand All @@ -191,13 +191,9 @@ partial void ProcessV1J2MidCompleteResponseContent(
};
}

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

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(string), JsonSerializerContext).ConfigureAwait(false) as string;
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
return __content;
}
}

Expand Down
Loading

0 comments on commit 1ba8c02

Please sign in to comment.