This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.35k
stars
4.66k
forks
source link
[BUG] Cannot upload fine tuning files for Azure OpenAI #44710
Uploading fine tuning files using the FileClient fails against Azure OpenAI. It work fine for OpenAI endpoints
Expected behavior
The upload succeeds
Actual behavior
The upload fails since the service rejects the request with an HTTP 4XX error message indicating the Content-Type header was not set for the file part of multipart form content:
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Content-Length: 119
{
"error": {
"code": "invalidPayload",
"message": "The file has no or an empty content type specified."
}
}
Reproduction Steps
var topLevel = new AzureOpenAIClient(
new Uri("https://your-resource-name.azure.openai.azure.com/"),
new DefaultAzureCredential());
FileClient client = topLevel.GetFileClient();
OpenAIFileInfo fileInfo = await client.UploadFileAsync("path/to/file", FileUploadPurpose.FineTune);
Library name and version
Azure.AI.OpenAI 2.0.0-beta.2
Describe the bug
Uploading fine tuning files using the FileClient fails against Azure OpenAI. It work fine for OpenAI endpoints
Expected behavior
The upload succeeds
Actual behavior
The upload fails since the service rejects the request with an HTTP 4XX error message indicating the Content-Type header was not set for the file part of multipart form content:
Reproduction Steps
Environment
No response