Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/libs/Cohere/Generated/Cohere.CohereApi.Chat.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,10 @@ partial void ProcessChatResponseContent(
};
}

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

var __responseValue = await global::Cohere.OneOf<global::Cohere.NonStreamedChatResponse, global::Cohere.StreamedChatResponse?>.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Cohere.OneOf<global::Cohere.NonStreamedChatResponse, global::Cohere.StreamedChatResponse?>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/libs/Cohere/Generated/Cohere.CohereApi.Chatv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,10 @@ partial void ProcessChatv2ResponseContent(
};
}

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

var __responseValue = await global::Cohere.OneOf<global::Cohere.ChatResponse, global::Cohere.StreamedChatResponseV2?>.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Cohere.OneOf<global::Cohere.ChatResponse, global::Cohere.StreamedChatResponseV2?>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/libs/Cohere/Generated/Cohere.CohereApi.CheckAPIKey.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,10 @@ partial void ProcessCheckAPIKeyResponseContent(
};
}

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

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

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

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

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

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

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

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

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

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

var __responseValue = await global::Cohere.OneOf<global::Cohere.EmbedFloatsResponse, global::Cohere.EmbedByTypeResponse>.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Cohere.OneOf<global::Cohere.EmbedFloatsResponse, global::Cohere.EmbedByTypeResponse>.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/libs/Cohere/Generated/Cohere.CohereApi.Embedv2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,10 @@ partial void ProcessEmbedv2ResponseContent(
};
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

return
__responseValue ??
await global::Cohere.TokenizeResponse.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 @@ -494,12 +494,10 @@ partial void ProcessCreateConnectorResponseContent(
};
}

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

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

return
__responseValue ??
await global::Cohere.CreateConnectorResponse.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 @@ -462,7 +462,7 @@ partial void ProcessDeleteConnectorResponseContent(
};
}

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

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 @@ -486,12 +486,10 @@ partial void ProcessGetConnectorResponseContent(
};
}

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

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

return
__responseValue ??
await global::Cohere.GetConnectorResponse.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 @@ -500,12 +500,10 @@ partial void ProcessListConnectorsResponseContent(
};
}

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

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

return
__responseValue ??
await global::Cohere.ListConnectorsResponse.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 @@ -495,12 +495,10 @@ partial void ProcessOAuthAuthorizeConnectorResponseContent(
};
}

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

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

return
__responseValue ??
await global::Cohere.OAuthAuthorizeResponse.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 @@ -500,12 +500,10 @@ partial void ProcessUpdateConnectorResponseContent(
};
}

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

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

return
__responseValue ??
await global::Cohere.UpdateConnectorResponse.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 @@ -609,12 +609,10 @@ partial void ProcessCreateDatasetResponseContent(
};
}

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

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

return
__responseValue ??
await global::Cohere.CreateDatasetResponse.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 @@ -462,7 +462,7 @@ partial void ProcessDeleteDatasetResponseContent(
};
}

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

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 @@ -486,12 +486,10 @@ partial void ProcessGetDatasetResponseContent(
};
}

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

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

return
__responseValue ??
await global::Cohere.GetDatasetResponse.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 @@ -480,12 +480,10 @@ partial void ProcessGetDatasetUsageResponseContent(
};
}

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

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

return
__responseValue ??
await global::Cohere.GetDatasetUsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Loading
Loading