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
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,40 @@ partial void ProcessCreateStreamingTranscriptionSseResponse(
}
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Model}"),
content: new global::System.Net.Http.StringContent(request.Model ?? string.Empty),
name: "\"model\"");
if (request.File != default)
{

var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty<byte>());
__contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Filename is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentFile,
name: "\"file\"",
Expand All @@ -132,42 +160,42 @@ partial void ProcessCreateStreamingTranscriptionSseResponse(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.FileUrl}"),
content: new global::System.Net.Http.StringContent(request.FileUrl ?? string.Empty),
name: "\"file_url\"");
}
if (request.FileId != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.FileId}"),
content: new global::System.Net.Http.StringContent(request.FileId ?? string.Empty),
name: "\"file_id\"");
}
if (request.Language != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Language}"),
content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty),
name: "\"language\"");
}
if (request.Temperature != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Temperature}"),
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.Temperature, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"temperature\"");
}
if (request.Stream != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Stream}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Stream, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"stream\"");
}
if (request.Diarize != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Diarize}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Diarize, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"diarize\"");
}
if (request.ContextBias != default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,40 @@ partial void ProcessCreateTranscriptionResponseContent(
}
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Model}"),
content: new global::System.Net.Http.StringContent(request.Model ?? string.Empty),
name: "\"model\"");
if (request.File != default)
{

var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty<byte>());
__contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Filename is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentFile,
name: "\"file\"",
Expand All @@ -137,42 +165,42 @@ partial void ProcessCreateTranscriptionResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.FileUrl}"),
content: new global::System.Net.Http.StringContent(request.FileUrl ?? string.Empty),
name: "\"file_url\"");
}
if (request.FileId != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.FileId}"),
content: new global::System.Net.Http.StringContent(request.FileId ?? string.Empty),
name: "\"file_id\"");
}
if (request.Language != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Language}"),
content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty),
name: "\"language\"");
}
if (request.Temperature != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Temperature}"),
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.Temperature, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"temperature\"");
}
if (request.Stream != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Stream}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Stream, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"stream\"");
}
if (request.Diarize != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Diarize}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Diarize, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"diarize\"");
}
if (request.ContextBias != default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessDeleteACustomVoiceResponseContent(
PrepareDeleteACustomVoiceRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
voiceId: voiceId);
voiceId: voiceId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetVoiceDetailsResponseContent(
PrepareGetVoiceDetailsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
voiceId: voiceId);
voiceId: voiceId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessGetVoiceSampleAudioResponseContent(
PrepareGetVoiceSampleAudioRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
voiceId: voiceId);
voiceId: voiceId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessUpdateVoiceMetadataResponseContent(
PrepareUpdateVoiceMetadataRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
voiceId: voiceId,
voiceId: voiceId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessCancelBatchJobResponseContent(
PrepareCancelBatchJobRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
jobId: jobId);
jobId: jobId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ partial void ProcessGetBatchJobResponseContent(
PrepareGetBatchJobRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
jobId: jobId,
jobId: jobId!,
inline: inline);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ partial void ProcessCreateOrUpdateAnAgentVersionAliasResponseContent(
PrepareCreateOrUpdateAnAgentVersionAliasRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId,
alias: alias,
version: version);
agentId: agentId!,
alias: alias!,
version: version!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ partial void ProcessDeleteAnAgentEntityResponse(
PrepareDeleteAnAgentEntityRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId);
agentId: agentId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ partial void ProcessDeleteAnAgentVersionAliasResponse(
PrepareDeleteAnAgentVersionAliasRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId,
alias: alias);
agentId: agentId!,
alias: alias!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessListAllAliasesForAnAgentResponseContent(
PrepareListAllAliasesForAnAgentRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId);
agentId: agentId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ partial void ProcessListAllVersionsOfAnAgentResponseContent(
PrepareListAllVersionsOfAnAgentRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId,
agentId: agentId!,
page: page,
pageSize: pageSize);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ partial void ProcessRetrieveASpecificVersionOfAnAgentResponseContent(
PrepareRetrieveASpecificVersionOfAnAgentRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId,
version: version);
agentId: agentId!,
version: version!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ partial void ProcessRetrieveAnAgentEntityResponseContent(
PrepareRetrieveAnAgentEntityRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId,
agentId: agentId!,
agentVersion: agentVersion);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessUpdateAnAgentEntityResponseContent(
PrepareUpdateAnAgentEntityRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId,
agentId: agentId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ partial void ProcessUpdateAnAgentVersionResponseContent(
PrepareUpdateAnAgentVersionRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
agentId: agentId,
version: version);
agentId: agentId!,
version: version!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessAppendNewEntriesToAnExistingConversationResponseContent(
PrepareAppendNewEntriesToAnExistingConversationRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
conversationId: conversationId,
conversationId: conversationId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ partial void ProcessAppendNewEntriesToAnExistingConversation2Response(
PrepareAppendNewEntriesToAnExistingConversation2Request(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
conversationId: conversationId,
conversationId: conversationId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ partial void ProcessDeleteAConversationResponse(
PrepareDeleteAConversationRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
conversationId: conversationId);
conversationId: conversationId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ partial void ProcessRestartAConversationStartingFromAGivenEntryResponseContent(
PrepareRestartAConversationStartingFromAGivenEntryRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
conversationId: conversationId,
conversationId: conversationId!,
request: request);

return __httpRequest;
Expand Down
Loading
Loading