diff --git a/src/libs/Groq/Generated/Groq.AudioClient.CreateTranscription.g.cs b/src/libs/Groq/Generated/Groq.AudioClient.CreateTranscription.g.cs index 9e54441..8b98427 100644 --- a/src/libs/Groq/Generated/Groq.AudioClient.CreateTranscription.g.cs +++ b/src/libs/Groq/Generated/Groq.AudioClient.CreateTranscription.g.cs @@ -121,6 +121,34 @@ partial void ProcessCreateTranscriptionResponseContent( { var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); + __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\"", @@ -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( @@ -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) diff --git a/src/libs/Groq/Generated/Groq.AudioClient.CreateTranslation.g.cs b/src/libs/Groq/Generated/Groq.AudioClient.CreateTranslation.g.cs index 585bded..7ea8a66 100644 --- a/src/libs/Groq/Generated/Groq.AudioClient.CreateTranslation.g.cs +++ b/src/libs/Groq/Generated/Groq.AudioClient.CreateTranslation.g.cs @@ -121,6 +121,34 @@ partial void ProcessCreateTranslationResponseContent( { var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty()); + __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\"", @@ -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( @@ -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; diff --git a/src/libs/Groq/Generated/Groq.BatchClient.CancelBatch.g.cs b/src/libs/Groq/Generated/Groq.BatchClient.CancelBatch.g.cs index 06b252d..58fb11c 100644 --- a/src/libs/Groq/Generated/Groq.BatchClient.CancelBatch.g.cs +++ b/src/libs/Groq/Generated/Groq.BatchClient.CancelBatch.g.cs @@ -124,7 +124,7 @@ partial void ProcessCancelBatchResponseContent( PrepareCancelBatchRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - batchId: batchId); + batchId: batchId!); return __httpRequest; } diff --git a/src/libs/Groq/Generated/Groq.BatchClient.RetrieveBatch.g.cs b/src/libs/Groq/Generated/Groq.BatchClient.RetrieveBatch.g.cs index e6d4a6a..202ff86 100644 --- a/src/libs/Groq/Generated/Groq.BatchClient.RetrieveBatch.g.cs +++ b/src/libs/Groq/Generated/Groq.BatchClient.RetrieveBatch.g.cs @@ -124,7 +124,7 @@ partial void ProcessRetrieveBatchResponseContent( PrepareRetrieveBatchRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - batchId: batchId); + batchId: batchId!); return __httpRequest; } diff --git a/src/libs/Groq/Generated/Groq.FilesClient.DeleteFile.g.cs b/src/libs/Groq/Generated/Groq.FilesClient.DeleteFile.g.cs index 2a7a523..07f4921 100644 --- a/src/libs/Groq/Generated/Groq.FilesClient.DeleteFile.g.cs +++ b/src/libs/Groq/Generated/Groq.FilesClient.DeleteFile.g.cs @@ -124,7 +124,7 @@ partial void ProcessDeleteFileResponseContent( PrepareDeleteFileRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - fileId: fileId); + fileId: fileId!); return __httpRequest; } diff --git a/src/libs/Groq/Generated/Groq.FilesClient.DownloadFile.g.cs b/src/libs/Groq/Generated/Groq.FilesClient.DownloadFile.g.cs index 6029598..293b493 100644 --- a/src/libs/Groq/Generated/Groq.FilesClient.DownloadFile.g.cs +++ b/src/libs/Groq/Generated/Groq.FilesClient.DownloadFile.g.cs @@ -124,7 +124,7 @@ partial void ProcessDownloadFileResponseContent( PrepareDownloadFileRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - fileId: fileId); + fileId: fileId!); return __httpRequest; } diff --git a/src/libs/Groq/Generated/Groq.FilesClient.RetrieveFile.g.cs b/src/libs/Groq/Generated/Groq.FilesClient.RetrieveFile.g.cs index 07d5961..94feec2 100644 --- a/src/libs/Groq/Generated/Groq.FilesClient.RetrieveFile.g.cs +++ b/src/libs/Groq/Generated/Groq.FilesClient.RetrieveFile.g.cs @@ -124,7 +124,7 @@ partial void ProcessRetrieveFileResponseContent( PrepareRetrieveFileRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - fileId: fileId); + fileId: fileId!); return __httpRequest; } diff --git a/src/libs/Groq/Generated/Groq.FilesClient.UploadFile.g.cs b/src/libs/Groq/Generated/Groq.FilesClient.UploadFile.g.cs index 9524b46..4f72546 100644 --- a/src/libs/Groq/Generated/Groq.FilesClient.UploadFile.g.cs +++ b/src/libs/Groq/Generated/Groq.FilesClient.UploadFile.g.cs @@ -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()); + __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\"", @@ -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; diff --git a/src/libs/Groq/Generated/Groq.FineTuningClient.DeleteFineTuning.g.cs b/src/libs/Groq/Generated/Groq.FineTuningClient.DeleteFineTuning.g.cs index 5510bf0..bcce0eb 100644 --- a/src/libs/Groq/Generated/Groq.FineTuningClient.DeleteFineTuning.g.cs +++ b/src/libs/Groq/Generated/Groq.FineTuningClient.DeleteFineTuning.g.cs @@ -124,7 +124,7 @@ partial void ProcessDeleteFineTuningResponseContent( PrepareDeleteFineTuningRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id); + id: id!); return __httpRequest; } diff --git a/src/libs/Groq/Generated/Groq.FineTuningClient.GetFineTuning.g.cs b/src/libs/Groq/Generated/Groq.FineTuningClient.GetFineTuning.g.cs index ce3a9af..0c4f890 100644 --- a/src/libs/Groq/Generated/Groq.FineTuningClient.GetFineTuning.g.cs +++ b/src/libs/Groq/Generated/Groq.FineTuningClient.GetFineTuning.g.cs @@ -124,7 +124,7 @@ partial void ProcessGetFineTuningResponseContent( PrepareGetFineTuningRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - id: id); + id: id!); return __httpRequest; } diff --git a/src/libs/Groq/Generated/Groq.ModelsClient.DeleteModel.g.cs b/src/libs/Groq/Generated/Groq.ModelsClient.DeleteModel.g.cs index b89cc65..f714593 100644 --- a/src/libs/Groq/Generated/Groq.ModelsClient.DeleteModel.g.cs +++ b/src/libs/Groq/Generated/Groq.ModelsClient.DeleteModel.g.cs @@ -125,7 +125,7 @@ partial void ProcessDeleteModelResponseContent( PrepareDeleteModelRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - model: model); + model: model!); return __httpRequest; } diff --git a/src/libs/Groq/Generated/Groq.ModelsClient.RetrieveModel.g.cs b/src/libs/Groq/Generated/Groq.ModelsClient.RetrieveModel.g.cs index 9731000..98e6381 100644 --- a/src/libs/Groq/Generated/Groq.ModelsClient.RetrieveModel.g.cs +++ b/src/libs/Groq/Generated/Groq.ModelsClient.RetrieveModel.g.cs @@ -125,7 +125,7 @@ partial void ProcessRetrieveModelResponseContent( PrepareRetrieveModelRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - model: model); + model: model!); return __httpRequest; }