Azure Ai Foundry Agent - не работает с GPT -5C#

Место общения программистов C#
Ответить
Anonymous
 Azure Ai Foundry Agent - не работает с GPT -5

Сообщение Anonymous »

Я хочу использовать Azure Ai Foundry Agent с AzureFunctionToOldefinition для использования функции Azure в качестве инструмента . Я следил за этим образцом: как использовать функции Azure с Azure AI-агентами
фрагмент:

Код: Выделить всё

//Define Azure Function tool definition.
AzureFunctionToolDefinition azureFnTool = new(
name: "foo",
description: "Get answers from the foo bot.",
inputBinding: new AzureFunctionBinding(
new AzureFunctionStorageQueue(
queueName: "azure-function-foo-input",
storageServiceEndpoint: storageQueueUri
)
),
outputBinding: new AzureFunctionBinding(
new AzureFunctionStorageQueue(
queueName: "azure-function-tool-output",
storageServiceEndpoint: storageQueueUri
)
),
parameters: BinaryData.FromObjectAsJson(
new
{
Type = "object",
Properties = new
{
query = new
{
Type = "string",
Description = "The question to ask.",
},
outputqueueuri = new
{
Type = "string",
Description = "The full output queue uri."
}
},
},
new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }
)
);

//Create agent and give it the Azure Function tool.
PersistentAgent agent = client.Administration.CreateAgent(
model: modelDeploymentName,
name: "azure-function-agent-foo",
instructions: "You are a helpful support agent. Use the provided function any "
+ "time the prompt contains the string 'What would foo say?'. When you invoke "
+ "the function, ALWAYS specify the output queue uri parameter as "
+ $"'{storageQueueUri}/azure-function-tool-output'. Always responds with "
+ "\"Foo says\" and then the response from the tool.",
tools: [azureFnTool]
);
< /code>
Но это не удается с: < /p>
Invalid tool value(s): azure_function. Use the Enterprise Standard offering to access these tool(s).
Status: 400 (Bad Request)
Я попытался настроить своего агента с GPT-4O, GPT-4.1 и GPT-5 (Althogh GPT-5 не выбирается в качестве развертывания).


Подробнее здесь: https://stackoverflow.com/questions/797 ... with-gpt-5
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»