Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Gli agenti Di Microsoft Foundry supportano la chiamata alle funzioni, che consente di estendere gli agenti con funzionalità personalizzate. Definire una funzione con il nome, i parametri e la descrizione e l'agente può richiedere all'app di chiamarla. L'app esegue la funzione e restituisce l'output. L'agente usa quindi il risultato per continuare la conversazione con dati accurati e in tempo reale dai sistemi.
Importante
Le sessioni scadono 10 minuti dopo la creazione. Invia gli output del tuo strumento prima della scadenza.
È possibile eseguire agenti con strumenti per le funzioni nel portale di Microsoft Foundry. Tuttavia, il portale non supporta l'aggiunta, la rimozione o l'aggiornamento delle definizioni di funzione in un agente. Usare l'SDK o l'API REST per configurare gli strumenti per le funzioni.
Supporto per l'utilizzo
✔️ (GA) indica la disponibilità generale, ✔️ (anteprima) indica l'anteprima pubblica e un trattino (-) indica che la funzionalità non è disponibile.
| Supporto di Microsoft Foundry | Python SDK | SDK di C# | JavaScript SDK | Java SDK | REST API | Configurazione dell'agente di base | Configurazione dell'agente standard |
|---|---|---|---|---|---|---|---|
| ✔️ | ✔️ (Anteprima) | ✔️ (Anteprima) | ✔️ (Anteprima) | - | ✔️ (GA) | ✔️ | ✔️ |
Annotazioni
Java SDK attualmente non supporta la chiamata di funzione con le nuove API dell'agente (azure-ai-projects pacchetto). Il supporto Java è disponibile solo per le API dell'agente classico. Per esempi di chiamata di funzioni Java con agenti classici, vedere la documentazione dell'agente classico.
Prerequisiti
Prima di iniziare, assicurarsi di avere:
Ambiente di agenti base o standard.
Un progetto Foundry e un modello distribuito.
Il pacchetto SDK versione non definitiva più recente per la tua lingua:
- Python:
azure-ai-projects>=2.0.0b4 - .NET:
Azure.AI.Projects.OpenAI(versione preliminare) - TypeScript:
@azure/ai-projects(versione beta più recente)
Per la procedura di installazione e autenticazione, vedere la guida introduttiva.
- Python:
Variabili di ambiente
Ogni linguaggio usa nomi di variabili di ambiente diversi. Usa un insieme in modo coerente.
| Language | Endpoint del progetto | Nome della distribuzione del modello |
|---|---|---|
| Pitone | FOUNDRY_PROJECT_ENDPOINT |
FOUNDRY_MODEL_DEPLOYMENT_NAME |
| C# | FOUNDRY_PROJECT_ENDPOINT |
FOUNDRY_MODEL_DEPLOYMENT_NAME |
| TypeScript | FOUNDRY_PROJECT_ENDPOINT |
FOUNDRY_MODEL_DEPLOYMENT_NAME |
| REST API | FOUNDRY_PROJECT_ENDPOINT |
(usare il campo corpo della richiesta) |
Suggerimento
Se si usa DefaultAzureCredential, accedere usando az login prima di eseguire gli esempi.
Verifica rapida
Se non si è certi che l'autenticazione e l'endpoint siano configurati correttamente, eseguire prima il frammento di codice seguente.
import os
from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential
from dotenv import load_dotenv
load_dotenv()
with (
DefaultAzureCredential() as credential,
AIProjectClient(endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"], credential=credential) as project_client,
):
print("Connected to project.")
Creare un agente con gli strumenti per le funzioni
La chiamata di funzione segue questo modello:
- Definire gli strumenti per le funzioni : descrivere il nome, i parametri e lo scopo di ogni funzione.
- Creare un agente : registrare l'agente con le definizioni di funzione.
- Invia un prompt, l'agente analizza il prompt e richiede chiamate di funzione, se necessario.
- Esegui e restituisce : l'app esegue la funzione e invia di nuovo l'output all'agente.
- Ottenere la risposta finale: l'agente usa l'output della funzione per completare la risposta.
Annotazioni
È necessario il pacchetto versione non definitiva più recente. Per altre informazioni, vedere la guida introduttiva.
Usare l'esempio di codice seguente per creare un agente, gestire una chiamata di funzione e restituire l'output dello strumento all'agente.
import os
import json
from dotenv import load_dotenv
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import PromptAgentDefinition, Tool, FunctionTool
from azure.identity import DefaultAzureCredential
from openai.types.responses.response_input_param import FunctionCallOutput, ResponseInputParam
load_dotenv()
def get_horoscope(sign: str) -> str:
"""Generate a horoscope for the given astrological sign."""
return f"{sign}: Next Tuesday you will befriend a baby otter."
endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
with (
DefaultAzureCredential() as credential,
AIProjectClient(endpoint=endpoint, credential=credential) as project_client,
project_client.get_openai_client() as openai_client,
):
# Define a function tool for the model to use
func_tool = FunctionTool(
name="get_horoscope",
parameters={
"type": "object",
"properties": {
"sign": {
"type": "string",
"description": "An astrological sign like Taurus or Aquarius",
},
},
"required": ["sign"],
"additionalProperties": False,
},
description="Get today's horoscope for an astrological sign.",
strict=True,
)
tools: list[Tool] = [func_tool]
agent = project_client.agents.create_version(
agent_name="MyAgent",
definition=PromptAgentDefinition(
model=os.environ["FOUNDRY_MODEL_DEPLOYMENT_NAME"],
instructions="You are a helpful assistant that can use function tools.",
tools=tools,
),
)
# Prompt the model with tools defined
response = openai_client.responses.create(
input="What is my horoscope? I am an Aquarius.",
extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},
)
print(f"Response output: {response.output_text}")
input_list: ResponseInputParam = []
# Process function calls
for item in response.output:
if item.type == "function_call":
if item.name == "get_horoscope":
# Execute the function logic for get_horoscope
horoscope = get_horoscope(**json.loads(item.arguments))
# Provide function call results to the model
input_list.append(
FunctionCallOutput(
type="function_call_output",
call_id=item.call_id,
output=json.dumps({"horoscope": horoscope}),
)
)
print("Final input:")
print(input_list)
response = openai_client.responses.create(
input=input_list,
previous_response_id=response.id,
extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},
)
print(f"Agent response: {response.output_text}")
print("\nCleaning up...")
project_client.agents.delete_version(agent_name=agent.name, agent_version=agent.version)
print("Agent deleted")
Output previsto
L'esempio seguente illustra l'output previsto:
Response output:
Final input:
[FunctionCallOutput(type='function_call_output', call_id='call_abc123', output='{"horoscope": "Aquarius: Next Tuesday you will befriend a baby otter."}')]
Usare agenti con funzioni di esempio
In questo esempio si usano funzioni locali con gli agenti. Usare le funzioni per fornire all'agente informazioni specifiche in risposta a una domanda dell'utente. Il codice in questo esempio è sincrono. Per un esempio asincrono, vedere l'esempio di codice di esempio nel repository Azure SDK per .NET in GitHub.
class FunctionCallingDemo
{
// Define three functions:
// 1. GetUserFavoriteCity always returns "Seattle, WA".
// 2. GetCityNickname handles only "Seattle, WA"
// and throws an exception for other city names.
// 3. GetWeatherAtLocation returns the weather in Seattle, WA.
/// Example of a function that defines no parameters but
/// returns the user's favorite city.
private static string GetUserFavoriteCity() => "Seattle, WA";
/// <summary>
/// Example of a function with a single required parameter
/// </summary>
/// <param name="location">The location to get nickname for.</param>
/// <returns>The city nickname.</returns>
/// <exception cref="NotImplementedException"></exception>
private static string GetCityNickname(string location) => location switch
{
"Seattle, WA" => "The Emerald City",
_ => throw new NotImplementedException(),
};
/// <summary>
/// Example of a function with one required and one optional, enum parameter
/// </summary>
/// <param name="location">Get weather for location.</param>
/// <param name="temperatureUnit">"c" or "f"</param>
/// <returns>The weather in selected location.</returns>
/// <exception cref="NotImplementedException"></exception>
public static string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch
{
"Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c",
_ => throw new NotImplementedException()
};
// For each function, create FunctionTool, which defines the function name, description, and parameters.
public static readonly FunctionTool getUserFavoriteCityTool = ResponseTool.CreateFunctionTool(
functionName: "getUserFavoriteCity",
functionDescription: "Gets the user's favorite city.",
functionParameters: BinaryData.FromString("{}"),
strictModeEnabled: false
);
public static readonly FunctionTool getCityNicknameTool = ResponseTool.CreateFunctionTool(
functionName: "getCityNickname",
functionDescription: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.",
functionParameters: BinaryData.FromObjectAsJson(
new
{
Type = "object",
Properties = new
{
Location = new
{
Type = "string",
Description = "The city and state, e.g. San Francisco, CA",
},
},
Required = new[] { "location" },
},
new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }
),
strictModeEnabled: false
);
private static readonly FunctionTool getCurrentWeatherAtLocationTool = ResponseTool.CreateFunctionTool(
functionName: "getCurrentWeatherAtLocation",
functionDescription: "Gets the current weather at a provided location.",
functionParameters: BinaryData.FromObjectAsJson(
new
{
Type = "object",
Properties = new
{
Location = new
{
Type = "string",
Description = "The city and state, e.g. San Francisco, CA",
},
Unit = new
{
Type = "string",
Enum = new[] { "c", "f" },
},
},
Required = new[] { "location" },
},
new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }
),
strictModeEnabled: false
);
// Create the method GetResolvedToolOutput.
// It runs the preceding functions and wraps the output in a ResponseItem object.
private static FunctionCallOutputResponseItem GetResolvedToolOutput(FunctionCallResponseItem item)
{
if (item.FunctionName == getUserFavoriteCityTool.FunctionName)
{
return ResponseItem.CreateFunctionCallOutputItem(item.CallId, GetUserFavoriteCity());
}
using JsonDocument argumentsJson = JsonDocument.Parse(item.FunctionArguments);
if (item.FunctionName == getCityNicknameTool.FunctionName)
{
string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString();
return ResponseItem.CreateFunctionCallOutputItem(item.CallId, GetCityNickname(locationArgument));
}
if (item.FunctionName == getCurrentWeatherAtLocationTool.FunctionName)
{
string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString();
if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement))
{
string unitArgument = unitElement.GetString();
return ResponseItem.CreateFunctionCallOutputItem(item.CallId, GetWeatherAtLocation(locationArgument, unitArgument));
}
return ResponseItem.CreateFunctionCallOutputItem(item.CallId, GetWeatherAtLocation(locationArgument));
}
return null;
}
public static void Main()
{
// Create project client and read the environment variables that will be used in the next steps.
var projectEndpoint = System.Environment.GetEnvironmentVariable("FOUNDRY_PROJECT_ENDPOINT");
var modelDeploymentName = System.Environment.GetEnvironmentVariable("FOUNDRY_MODEL_DEPLOYMENT_NAME");
AIProjectClient projectClient = new(endpoint: new Uri(projectEndpoint), tokenProvider: new DefaultAzureCredential());
// Create an agent version with the defined functions as tools.
PromptAgentDefinition agentDefinition = new(model: modelDeploymentName)
{
Instructions = "You are a weather bot. Use the provided functions to help answer questions. "
+ "Customize your responses to the user's preferences as much as possible and use friendly "
+ "nicknames for cities whenever possible.",
Tools = { getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool }
};
AgentVersion agentVersion = projectClient.Agents.CreateAgentVersion(
agentName: "myAgent",
options: new(agentDefinition));
// If the local function call is required, the response item is of type FunctionCallResponseItem.
// It contains the function name needed by the Agent. In this case, use the helper method
// GetResolvedToolOutput to get the FunctionCallOutputResponseItem with the function call result.
// To provide the right answer, supply all the response items to the CreateResponse call.
// At the end, output the function's response.
ResponsesClient responseClient = projectClient.OpenAI.GetProjectResponsesClientForAgent(agentVersion.Name);
ResponseItem request = ResponseItem.CreateUserMessageItem("What's the weather like in my favorite city?");
var inputItems = new List<ResponseItem> { request };
string previousResponseId = null;
bool functionCalled = false;
ResponseResult response;
do
{
response = responseClient.CreateResponse(
previousResponseId: previousResponseId,
inputItems: inputItems);
previousResponseId = response.Id;
inputItems.Clear();
functionCalled = false;
foreach (ResponseItem responseItem in response.OutputItems)
{
inputItems.Add(responseItem);
if (responseItem is FunctionCallResponseItem functionToolCall)
{
Console.WriteLine($"Calling {functionToolCall.FunctionName}...");
inputItems.Add(GetResolvedToolOutput(functionToolCall));
functionCalled = true;
}
}
} while (functionCalled);
Console.WriteLine(response.GetOutputText());
// Remove all the resources created in this sample.
projectClient.Agents.DeleteAgentVersion(agentName: agentVersion.Name, agentVersion: agentVersion.Version);
}
}
Output previsto
L'esempio seguente illustra l'output previsto:
Calling getUserFavoriteCity...
Calling getCityNickname...
Calling getCurrentWeatherAtLocation...
Your favorite city, Seattle, WA, is also known as The Emerald City. The current weather there is 70f.
Esistono due modi per usare la funzione di chiamata nel Foundry Agent Service.
- Creare un oggetto
response. Quando è necessario che l'agente chiami nuovamente le funzioni, creare un altroresponse. - Creare un
conversation, quindi creare più elementi di conversazione. Ogni elemento della conversazione corrisponde a un elementoresponse.
Impostare le variabili di ambiente seguenti prima di eseguire gli esempi:
export AGENT_TOKEN=$(az account get-access-token --scope "https://ai.azure.com/.default" --query accessToken -o tsv)
Definire una funzione che l'agente deve chiamare
Per iniziare, definire una funzione che l'agente possa chiamare. Quando si crea una funzione che un agente deve chiamare, descriverne la struttura e tutti i parametri necessari in una docstring. Per le funzioni di esempio, vedere gli altri linguaggi SDK.
Crea un agente
curl -X POST "$FOUNDRY_PROJECT_ENDPOINT/agents?api-version=v1" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AGENT_TOKEN" \
-d '{
"name": "<AGENT_NAME>-function-calling",
"description": "Agent with function calling",
"definition": {
"kind": "prompt",
"model": "<MODEL_DEPLOYMENT>",
"instructions": "You are a helpful agent.",
"tools": [
{
"type": "function",
"name": "getCurrentWeather",
"description": "Get the current weather in a location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "The city and state e.g. San Francisco, CA"},
"unit": {"type": "string", "enum": ["c", "f"]}
},
"required": ["location"]
}
}
]
}
}'
Creare una conversazione
curl -X POST "$FOUNDRY_PROJECT_ENDPOINT/openai/v1/conversations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AGENT_TOKEN" \
-d '{
"items": [
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "What'\''s the weather in Dar es Salaam, Tanzania?"
}
]
}
]
}'
Salvare l'ID conversazione restituito (conv_xyz...) per il passaggio successivo.
Creare una risposta
Sostituire <CONVERSATION_ID> con l'ID del passaggio precedente.
curl -X POST "$FOUNDRY_PROJECT_ENDPOINT/openai/v1/responses" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AGENT_TOKEN" \
-d '{
"agent": {"type": "agent_reference", "name": "<AGENT_NAME>-function-calling"},
"conversation": "<CONVERSATION_ID>",
"input": []
}'
Output previsto
La risposta contiene un elemento di chiamata di funzione che è necessario elaborare:
{
"output": [
{
"type": "function_call",
"call_id": "call_xyz789",
"name": "getCurrentWeather",
"arguments": "{\"location\": \"Dar es Salaam, Tanzania\", \"unit\": \"c\"}"
}
]
}
Dopo aver elaborato la chiamata alla funzione e aver restituito l'output all'agente, la risposta finale include le informazioni meteo in linguaggio naturale.
Usare l'esempio di codice seguente per creare un agente con strumenti per le funzioni, gestire le chiamate di funzione dal modello e fornire i risultati della funzione per ottenere la risposta finale.
import { DefaultAzureCredential } from "@azure/identity";
import { AIProjectClient } from "@azure/ai-projects";
import "dotenv/config";
const projectEndpoint = process.env["FOUNDRY_PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["FOUNDRY_MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
/**
* Define a function tool for the model to use
*/
const funcTool = {
type: "function" as const,
name: "get_horoscope",
description: "Get today's horoscope for an astrological sign.",
strict: true,
parameters: {
type: "object",
properties: {
sign: {
type: "string",
description: "An astrological sign like Taurus or Aquarius",
},
},
required: ["sign"],
additionalProperties: false,
},
};
/**
* Generate a horoscope for the given astrological sign.
*/
function getHoroscope(sign: string): string {
return `${sign}: Next Tuesday you will befriend a baby otter.`;
}
export async function main(): Promise<void> {
// Create AI Project client
const project = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
const openAIClient = await project.getOpenAIClient();
// Create agent with function tools
console.log("Creating agent with function tools...");
const agent = await project.agents.createVersion("function-tool-agent", {
kind: "prompt",
model: deploymentName,
instructions: "You are a helpful assistant that can use function tools.",
tools: [funcTool],
});
console.log(`Agent created (id: ${agent.id}, name: ${agent.name}, version: ${agent.version})`);
// Prompt the model with tools defined
console.log("\nGenerating initial response...");
const response = await openAIClient.responses.create(
{
input: [
{
type: "message",
role: "user",
content: "What is my horoscope? I am an Aquarius.",
},
],
},
{
body: { agent: { name: agent.name, type: "agent_reference" } },
},
);
console.log(`Response output: ${response.output_text}`);
// Process function calls
const inputList: Array<{
type: "function_call_output";
call_id: string;
output: string;
}> = [];
for (const item of response.output) {
if (item.type === "function_call") {
if (item.name === "get_horoscope") {
// Parse the function arguments
const args = JSON.parse(item.arguments);
// Execute the function logic for get_horoscope
const horoscope = getHoroscope(args.sign);
// Provide function call results to the model
inputList.push({
type: "function_call_output",
call_id: item.call_id,
output: JSON.stringify({ horoscope }),
});
}
}
}
console.log("\nFinal input:");
console.log(JSON.stringify(inputList, null, 2));
// Submit function results to get final response
const finalResponse = await openAIClient.responses.create(
{
input: inputList,
previous_response_id: response.id,
},
{
body: { agent: { name: agent.name, type: "agent_reference" } },
},
);
// The model should be able to give a response!
console.log("\nFinal output:");
console.log(finalResponse.output_text);
// Clean up
console.log("\nCleaning up resources...");
await project.agents.deleteVersion(agent.name, agent.version);
console.log("Agent deleted");
}
main().catch((err) => {
console.error("The sample encountered an error:", err);
});
Output previsto
L'esempio seguente illustra l'output previsto:
Creating agent with function tools...
Agent created (id: <agent-id>, name: function-tool-agent, version: <version>)
Generating initial response...
Response output:
Final input:
[
{
"type": "function_call_output",
"call_id": "call_abc123",
"output": "{\"horoscope\":\"Aquarius: Next Tuesday you will befriend a baby otter.\"}"
}
]
Final output:
Your horoscope for Aquarius: Next Tuesday you will befriend a baby otter.
Cleaning up resources...
Agent deleted
Verificare il funzionamento delle chiamate di funzione
Usare questi controlli per verificare che la chiamata di funzione funzioni:
- La prima risposta contiene un elemento di output con
typeimpostato sufunction_call. - L'app esegue la funzione richiesta usando gli argomenti restituiti.
- L'app invia una risposta di completamento che include un
function_call_outputelemento e fa riferimento alla risposta precedente e l'agente restituisce una risposta in linguaggio naturale.
Se utilizzi il tracciamento in Microsoft Foundry, verifica che si sia verificata l'invocazione dello strumento. Per indicazioni sulla convalida della chiamata e del controllo dell'utilizzo degli strumenti, vedere Procedure consigliate per l'uso degli strumenti nel servizio Microsoft Foundry Agent.
Considerazioni sulla sicurezza e i dati
- Trattare gli argomenti dello strumento e le uscite degli strumenti come input non attendibile. Convalidare e purificare i valori prima di usarli.
- Non passare segreti (chiavi API, token, stringhe di connessione) nell'output dello strumento. Restituisce solo i dati necessari per il modello.
- Applicare privilegi minimi all'identità usata da
DefaultAzureCredential. - Evitare effetti collaterali a meno che non siano esplicitamente intenzionali. Ad esempio, limitare gli strumenti di funzione alle operazioni sicure o richiedere una conferma esplicita dell'utente per le azioni che modificano i dati.
- Per le operazioni a esecuzione prolungata, restituire immediatamente uno stato e implementare il polling. Il limite di tempo di 10 minuti si applica al tempo trascorso totale, non al tempo di esecuzione di singole funzioni.
Risoluzione dei problemi
| Problema | Causa possibile | Risoluzione |
|---|---|---|
| L'agente restituisce una chiamata di funzione ma non fornisce una risposta definitiva. | Output dello strumento non restituito al modello. | Eseguire la funzione, quindi chiamare responses.create con l'output dello strumento e chiamare previous_response_id per continuare. |
| Non viene eseguita alcuna chiamata di funzione. | Funzione non inclusa nella definizione dell'agente o denominazione inappropriata. | Verificare che lo strumento di funzione venga aggiunto all'agente. Usare nomi e descrizioni dei parametri chiari e descrittivi. |
| Gli argomenti non sono JSON validi. | Mancata corrispondenza dello schema o allucinazione del modello. | Verificare che lo schema JSON usi i tipi corretti e le proprietà necessarie. Gestire gli errori di analisi sintattica con eleganza nell'app. |
| Campi obbligatori mancanti. | Lo schema non applica le proprietà obbligatorie. | Aggiungere "required": [...] una matrice allo schema dei parametri. Impostare strict: true per la convalida più restrittiva. |
| Gli output dei tool falliscono a causa della scadenza del termine. | Esecuzione scaduta (limite di 10 minuti). | Restituisce tempestivamente gli output degli strumenti. Per le operazioni lente, restituire uno stato ed eseguire il polling separatamente. |
| Funzione chiamata con parametri errati. | Descrizione della funzione ambigua. | Migliorare il campo della funzione description . Aggiungere descrizioni dettagliate dei parametri con esempi. |
| Più chiamate di funzione in una sola risposta. | Il modello ha determinato più funzioni necessarie. | Gestire ogni chiamata di funzione nell'array di output. Restituisce tutti i risultati in una singola responses.create chiamata. |
| Funzione non visibile nel portale Foundry. | Il portale non esegue chiamate di funzione. | Testare la chiamata di una funzione tramite SDK o API REST. Il portale mostra gli agenti, ma non richiama le funzioni. |
Pulire le risorse
Al termine del test, eliminare le risorse create per evitare costi continui.
Eliminare l'agente:
curl -X DELETE "$FOUNDRY_PROJECT_ENDPOINT/agents/<AGENT_NAME>-function-calling?api-version=v1" \
-H "Authorization: Bearer $AGENT_TOKEN"
Eliminare la conversazione:
curl -X DELETE "$FOUNDRY_PROJECT_ENDPOINT/openai/v1/conversations/<CONVERSATION_ID>" \
-H "Authorization: Bearer $AGENT_TOKEN"