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
38 changes: 33 additions & 5 deletions src/libs/Groq/Generated/Groq.AudioClient.CreateTranscription.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,34 @@ partial void ProcessCreateTranscriptionResponseContent(
{

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 @@ -134,7 +162,7 @@ partial void ProcessCreateTranscriptionResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Url}"),
content: new global::System.Net.Http.StringContent(request.Url ?? string.Empty),
name: "\"url\"");
}
__httpRequestContent.Add(
Expand All @@ -144,28 +172,28 @@ partial void ProcessCreateTranscriptionResponseContent(
{

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

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

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.ResponseFormat).HasValue ? (request.ResponseFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"response_format\"");
}
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.TimestampGranularities != default)
Expand Down
36 changes: 32 additions & 4 deletions src/libs/Groq/Generated/Groq.AudioClient.CreateTranslation.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,34 @@ partial void ProcessCreateTranslationResponseContent(
{

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 @@ -134,7 +162,7 @@ partial void ProcessCreateTranslationResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Url}"),
content: new global::System.Net.Http.StringContent(request.Url ?? string.Empty),
name: "\"url\"");
}
__httpRequestContent.Add(
Expand All @@ -144,21 +172,21 @@ partial void ProcessCreateTranslationResponseContent(
{

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

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.ResponseFormat).HasValue ? (request.ResponseFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"response_format\"");
}
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\"");
}
__httpRequest.Content = __httpRequestContent;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Groq/Generated/Groq.BatchClient.CancelBatch.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessCancelBatchResponseContent(
PrepareCancelBatchRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
batchId: batchId);
batchId: batchId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessRetrieveBatchResponseContent(
PrepareRetrieveBatchRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
batchId: batchId);
batchId: batchId!);

return __httpRequest;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Groq/Generated/Groq.FilesClient.DeleteFile.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessDeleteFileResponseContent(
PrepareDeleteFileRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
fileId: fileId);
fileId: fileId!);

return __httpRequest;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Groq/Generated/Groq.FilesClient.DownloadFile.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessDownloadFileResponseContent(
PrepareDownloadFileRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
fileId: fileId);
fileId: fileId!);

return __httpRequest;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Groq/Generated/Groq.FilesClient.RetrieveFile.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessRetrieveFileResponseContent(
PrepareRetrieveFileRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
fileId: fileId);
fileId: fileId!);

return __httpRequest;
}
Expand Down
30 changes: 29 additions & 1 deletion src/libs/Groq/Generated/Groq.FilesClient.UploadFile.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,34 @@ partial void ProcessUploadFileResponseContent(
}
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
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,7 +160,7 @@ partial void ProcessUploadFileResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Purpose.ToValueString()}"),
content: new global::System.Net.Http.StringContent(request.Purpose.ToValueString()),
name: "\"purpose\"");
}
__httpRequest.Content = __httpRequestContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessDeleteFineTuningResponseContent(
PrepareDeleteFineTuningRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id);
id: id!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessGetFineTuningResponseContent(
PrepareGetFineTuningRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id);
id: id!);

return __httpRequest;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Groq/Generated/Groq.ModelsClient.DeleteModel.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ partial void ProcessDeleteModelResponseContent(
PrepareDeleteModelRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
model: model);
model: model!);

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

return __httpRequest;
}
Expand Down