Я пытаюсь использовать модель Phi-4-Multimodal-instruct с аудио вводом через клиент Azure.ai.Inerence C#, но при отправке файла MP3 я получаю «неверную ошибку ввода». Такая же ошибка возникает с конечными точками GitHub и Azure.Azure.RequestFailedException: invalid input error
Status: 422 (Unprocessable Entity)
ErrorCode: Invalid input
Content:
{
"error": {
"code": "Invalid input",
"status": 422,
"message": "invalid input error",
"details": [
{
"type": "string_type",
"loc": [
"body",
"messages",
0,
"content",
"str"
],
"msg": "Input should be a valid string",
"input": [
{
"type": "text",
"text": "Based on the attached audio, generate a comprehensive text transcription of the spoken content."
},
{
"type": "input_audio",
"input_audio": {
"data": "...",
"format": "mp3"
}
}
]
},
{
"type": "missing",
"loc": [
"body",
"messages",
0,
"content",
"list[function-after[validate_content_part(), ContentPart]]",
1,
"input_audio",
"url"
],
"msg": "Field required",
"input": {
"data": "...",
"format": "mp3"
}
}
]
}
}
< /code>
code < /h2>
using Azure;
using Azure.AI.Inference;
// Azure endpoint configuration
var endpoint = new Uri("https://###.services.ai.azure.com/models");
var credential = new AzureKeyCredential("###");
var model = "Phi-4-multimodal-instruct";
var client = new ChatCompletionsClient(
endpoint,
credential,
new AzureAIInferenceClientOptions());
ChatMessageContentItem[] userContent =
{
new ChatMessageAudioContentItem(audioFilePath: "sample.mp3", AudioContentFormat.Mp3)
};
var requestOptions = new ChatCompletionsOptions()
{
Messages =
{
new ChatRequestSystemMessage("Based on the attached audio, generate a comprehensive text transcription of the spoken content."),
new ChatRequestUserMessage(userContent),
},
Model = model,
Temperature = 1,
MaxTokens = 1000,
};
Response response = client.Complete(requestOptions);
System.Console.WriteLine(response.Value.Content);
< /code>
что я попробовал < /h2>
[*] Пробое как с github, так и с конечными точками Azure с идентичными результатами < /li>
Проверенные MP3 < /li>
< /ul>
< /h2>
< /ul>
< /h2>
< /ul>
Phi-4-Multimodal-Instruct, который должен поддерживать аудио ввод через C# client?
Есть ли другой способ форматирования аудио ввод для этой конкретной модели?>
Подробнее здесь: https://stackoverflow.com/questions/794 ... ut-error-i
Phi-4-Multimodal-Instruct Model отклоняет аудио ввод с «неверной ошибкой ввода» в C# azure.ai.inerence Client ⇐ C#
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Работа с Llama 3.2 Vision Multimodal для обнаружения объектов с использованием roboflow
Anonymous » » в форуме Python - 0 Ответы
- 21 Просмотры
-
Последнее сообщение Anonymous
-