Dalam panduan cepat ini, Anda akan memulai penggunaan model dan agen di Foundry.
Anda akan:
- Membuat respons dari model
- Membuat agen dengan perintah yang ditentukan
- Mengadakan percakapan bergiliran dengan agen
Prasyarat
- Model yang diterapkan di Microsoft Foundry. Jika Anda tidak memiliki model, selesaikan Quickstart: Siapkan sumber daya Microsoft Foundry terlebih dahulu.
- Bahasa runtime yang diperlukan, alat global, dan ekstensi Visual Studio Code sebagaimana dijelaskan dalam Menyiapkan lingkungan pengembangan Anda.
Mengatur variabel lingkungan dan mendapatkan kode
Simpan titik akhir proyek Anda sebagai variabel lingkungan. Atur juga nilai-nilai ini untuk digunakan dalam skrip Anda.
PROJECT_ENDPOINT=<endpoint copied from welcome screen>
AGENT_NAME="MyAgent"
MODEL_DEPLOYMENT_NAME="gpt-4.1-mini"
Ikuti di bawah ini atau dapatkan kode:
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan skrip Python Anda.
Ikuti di bawah ini atau dapatkan kode:
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan skrip C# Anda.
Ikuti di bawah ini atau dapatkan kode:
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan skrip TypeScript Anda.
Ikuti di bawah ini atau dapatkan kode:
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan skrip Java Anda.
Ikuti di bawah ini atau dapatkan kode:
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan perintah berikutnya.
Dapatkan token akses sementara. Ini akan kedaluwarsa dalam 60-90 menit, Anda perlu menyegarkannya setelah itu.
az account get-access-token --scope https://ai.azure.com/.default
Simpan hasilnya sebagai variabel AZURE_AI_AUTH_TOKENlingkungan .
Tidak ada kode yang diperlukan saat menggunakan portal Foundry.
Menginstal dan mengautentikasi
Pastikan Anda menginstal versi pratinjau/prarilis paket yang benar seperti yang ditunjukkan di sini.
Pasang paket ini, termasuk versi pratinjau azure-ai-projects. Versi ini menggunakan API proyek Foundry (baru) (pratinjau).
pip install --pre "azure-ai-projects>=2.0.0b4"
pip install python-dotenv
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan skrip Python Anda.
Instal paket:
Tambahkan paket NuGet menggunakan .NET CLI di terminal terintegrasi: Paket ini menggunakan API proyek Foundry (baru) (pratinjau).
dotnet add package Azure.AI.Projects --prerelease
dotnet add package Azure.AI.Projects.OpenAI --prerelease
dotnet add package Azure.Identity
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan skrip C# Anda.
Pasang paket ini, termasuk versi pratinjau @azure/ai-projects. Versi ini menggunakan API proyek Foundry (baru) (pratinjau).:
npm install @azure/ai-projects@beta @azure/identity dotenv
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan skrip TypeScript Anda.
- Masuk menggunakan perintah CLI
az login untuk mengautentikasi sebelum menjalankan skrip Java Anda.
Masuk menggunakan perintah CLI az login untuk mengautentikasi sebelum menjalankan perintah berikutnya.
Dapatkan token akses sementara. Ini akan kedaluwarsa dalam 60-90 menit, Anda perlu menyegarkannya setelah itu.
az account get-access-token --scope https://ai.azure.com/.default
Simpan hasilnya sebagai variabel AZURE_AI_AUTH_TOKENlingkungan .
Tidak ada penginstalan yang diperlukan untuk menggunakan portal Foundry.
Petunjuk / Saran
Kode menggunakan Azure AI Projects 2.x dan tidak kompatibel dengan Azure AI Projects 1.x.
Lihat dokumentasi Foundry (klasik) untuk versi Azure AI Projects 1.x.
Mengobrol dengan model
Berinteraksi dengan model adalah blok penyusun dasar aplikasi AI. Kirim input dan terima respons dari model:
import os
from dotenv import load_dotenv
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
load_dotenv()
print(f"Using PROJECT_ENDPOINT: {os.environ['PROJECT_ENDPOINT']}")
print(f"Using MODEL_DEPLOYMENT_NAME: {os.environ['MODEL_DEPLOYMENT_NAME']}")
project_client = AIProjectClient(
endpoint=os.environ["PROJECT_ENDPOINT"],
credential=DefaultAzureCredential(),
)
openai_client = project_client.get_openai_client()
response = openai_client.responses.create(
model=os.environ["MODEL_DEPLOYMENT_NAME"],
input="What is the size of France in square miles?",
)
print(f"Response output: {response.output_text}")
using Azure.AI.Projects;
using Azure.AI.Projects.OpenAI;
using Azure.Identity;
using OpenAI.Responses;
#pragma warning disable OPENAI001
string projectEndpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT")
?? throw new InvalidOperationException("Missing environment variable 'PROJECT_ENDPOINT'");
string modelDeploymentName = Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME")
?? throw new InvalidOperationException("Missing environment variable 'MODEL_DEPLOYMENT_NAME'");
AIProjectClient projectClient = new(new Uri(projectEndpoint), new AzureCliCredential());
ProjectResponsesClient responseClient = projectClient.OpenAI.GetProjectResponsesClientForModel(modelDeploymentName);
ResponseResult response = await responseClient.CreateResponseAsync("What is the size of France in square miles?");
Console.WriteLine(response.GetOutputText());
import { DefaultAzureCredential } from "@azure/identity";
import { AIProjectClient } from "@azure/ai-projects";
import "dotenv/config";
const projectEndpoint = process.env["PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
async function main(): Promise<void> {
const project = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
const openAIClient = project.getOpenAIClient();
const response = await openAIClient.responses.create({
model: deploymentName,
input: "What is the size of France in square miles?",
});
console.log(`Response output: ${response.output_text}`);
}
main().catch(console.error);
package com.azure.ai.agents;
import com.azure.ai.agents.models.AgentReference;
import com.azure.ai.agents.models.AgentVersionDetails;
import com.azure.ai.agents.models.PromptAgentDefinition;
import com.azure.identity.AuthenticationUtil;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.openai.azure.AzureOpenAIServiceVersion;
import com.openai.azure.AzureUrlPathMode;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.credential.BearerTokenCredential;
import com.openai.models.conversations.Conversation;
import com.openai.models.conversations.items.ItemCreateParams;
import com.openai.models.responses.EasyInputMessage;
import com.openai.models.responses.Response;
import com.openai.models.responses.ResponseCreateParams;
public class ChatWithAgent {
public static void main(String[] args) {
String endpoint = Configuration.getGlobalConfiguration().get("AZURE_AGENTS_ENDPOINT");
String agentName = "MyAgent";
AgentsClient agentsClient = new AgentsClientBuilder()
.credential(new DefaultAzureCredentialBuilder().build())
.endpoint(endpoint)
.buildAgentsClient();
AgentDetails agent = agentsClient.getAgent(agentName);
Conversation conversation = conversationsClient.getConversationService().create();
conversationsClient.getConversationService().items().create(
ItemCreateParams.builder()
.conversationId(conversation.id())
.addItem(EasyInputMessage.builder()
.role(EasyInputMessage.Role.SYSTEM)
.content("You are a helpful assistant that speaks like a pirate.")
.build()
).addItem(EasyInputMessage.builder()
.role(EasyInputMessage.Role.USER)
.content("Hello, agent!")
.build()
).build()
);
AgentReference agentReference = new AgentReference(agent.getName()).setVersion(agent.getVersion());
Response response = responsesClient.createWithAgentConversation(agentReference, conversation.id());
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl(endpoint.endsWith("/") ? endpoint + "openai" : endpoint + "/openai")
.azureUrlPathMode(AzureUrlPathMode.UNIFIED)
.credential(BearerTokenCredential.create(AuthenticationUtil.getBearerTokenSupplier(
new DefaultAzureCredentialBuilder().build(), "https://ai.azure.com/.default")))
.azureServiceVersion(AzureOpenAIServiceVersion.fromString("2025-11-15-preview"))
.build();
ResponseCreateParams responseRequest = new ResponseCreateParams.Builder()
.input("Hello, how can you help me?")
.model(model)
.build();
Response result = client.responses().create(responseRequest);
}
}
Ganti YOUR-FOUNDRY-RESOURCE-NAME dengan nilai Anda:
curl -X POST https://YOUR-FOUNDRY-RESOURCE-NAME.services.ai.azure.com/api/projects/YOUR-PROJECT-NAME/openai/responses?api-version=2025-11-15-preview \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AZURE_AI_AUTH_TOKEN" \
-d '{
"model": "gpt-4.1-mini",
"input": "What is the size of France in square miles?"
}'
Setelah model disebarkan, Anda secara otomatis dipindahkan dari Beranda ke bagian Build . Model baru Anda dipilih dan siap untuk Anda coba.
Mulailah mengobrol dengan model Anda, misalnya, "Tuliskan saya puisi tentang bunga."
Setelah menjalankan kode, Anda akan melihat respons yang dihasilkan model di konsol (misalnya, puisi singkat atau jawaban atas perintah Anda). Ini mengonfirmasi titik akhir proyek, autentikasi, dan penyebaran model Anda berfungsi dengan benar.
Petunjuk / Saran
Kode menggunakan Azure AI Projects 2.x dan tidak kompatibel dengan Azure AI Projects 1.x.
Lihat dokumentasi Foundry (klasik) untuk versi Azure AI Projects 1.x.
Membuat agen
Buat agen menggunakan model yang Anda sebarkan.
Agen mendefinisikan perilaku inti. Setelah dibuat, ini memastikan respons yang konsisten dalam interaksi pengguna tanpa mengulangi instruksi setiap kali. Anda dapat memperbarui atau menghapus agen kapan saja.
import os
from dotenv import load_dotenv
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import PromptAgentDefinition
load_dotenv()
project_client = AIProjectClient(
endpoint=os.environ["PROJECT_ENDPOINT"],
credential=DefaultAzureCredential(),
)
agent = project_client.agents.create_version(
agent_name=os.environ["AGENT_NAME"],
definition=PromptAgentDefinition(
model=os.environ["MODEL_DEPLOYMENT_NAME"],
instructions="You are a helpful assistant that answers general questions",
),
)
print(f"Agent created (id: {agent.id}, name: {agent.name}, version: {agent.version})")
using Azure.AI.Projects;
using Azure.AI.Projects.OpenAI;
using Azure.Identity;
string projectEndpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT")
?? throw new InvalidOperationException("Missing environment variable 'PROJECT_ENDPOINT'");
string modelDeploymentName = Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME")
?? throw new InvalidOperationException("Missing environment variable 'MODEL_DEPLOYMENT_NAME'");
string agentName = Environment.GetEnvironmentVariable("AGENT_NAME")
?? throw new InvalidOperationException("Missing environment variable 'AGENT_NAME'");
AIProjectClient projectClient = new(new Uri(projectEndpoint), new AzureCliCredential());
AgentDefinition agentDefinition = new PromptAgentDefinition(modelDeploymentName)
{
Instructions = "You are a helpful assistant that answers general questions",
};
AgentVersion newAgentVersion = projectClient.Agents.CreateAgentVersion(
agentName,
options: new(agentDefinition));
List<AgentVersion> agentVersions = [..projectClient.Agents.GetAgentVersions(agentName)];
foreach (AgentVersion agentVersion in agentVersions)
{
Console.WriteLine($"Agent: {agentVersion.Id}, Name: {agentVersion.Name}, Version: {agentVersion.Version}");
}
import { DefaultAzureCredential } from "@azure/identity";
import { AIProjectClient } from "@azure/ai-projects";
import "dotenv/config";
const projectEndpoint = process.env["PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
async function main(): Promise<void> {
const project = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
const agent = await project.agents.createVersion("my-agent-basic", {
kind: "prompt",
model: deploymentName,
instructions: "You are a helpful assistant that answers general questions",
});
console.log(`Agent created (id: ${agent.id}, name: ${agent.name}, version: ${agent.version})`);
}
main().catch(console.error);
package com.azure.ai.agents;
import com.azure.ai.agents.models.AgentVersionDetails;
import com.azure.ai.agents.models.PromptAgentDefinition;
import com.azure.core.util.Configuration;
import com.azure.identity.DefaultAzureCredentialBuilder;
public class CreateAgent {
public static void main(String[] args) {
String endpoint = Configuration.getGlobalConfiguration().get("PROJECT_ENDPOINT");
String model = Configuration.getGlobalConfiguration().get("MODEL_DEPLOYMENT_NAME");
// Code sample for creating an agent
AgentsClient agentsClient = new AgentsClientBuilder()
.credential(new DefaultAzureCredentialBuilder().build())
.endpoint(endpoint)
.buildAgentsClient();
PromptAgentDefinition request = new PromptAgentDefinition(model);
AgentVersionDetails agent = agentsClient.createAgentVersion("MyAgent", request);
System.out.println("Agent ID: " + agent.getId());
System.out.println("Agent Name: " + agent.getName());
System.out.println("Agent Version: " + agent.getVersion());
}
}
Ganti YOUR-FOUNDRY-RESOURCE-NAME dengan nilai Anda:
curl -X POST https://YOUR-FOUNDRY-RESOURCE-NAME.services.ai.azure.com/api/projects/YOUR-PROJECT-NAME/agents?api-version=2025-11-15-preview \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AZURE_AI_AUTH_TOKEN" \
-d '{
"name": "MyAgent",
"definition": {
"kind": "prompt",
"model": "gpt-4.1-mini",
"instructions": "You are a helpful assistant that answers general questions"
}
}'
Sekarang buat agen dan berinteraksi dengannya.
- Masih di bagian Build , pilih Agen di panel kiri.
- Pilih Buat agen dan beri nama.
Output mengonfirmasi bahwa agen telah dibuat. Untuk tab SDK, Anda akan melihat nama agen dan ID yang dicetak ke konsol.
Petunjuk / Saran
Kode menggunakan Azure AI Projects 2.x dan tidak kompatibel dengan Azure AI Projects 1.x.
Lihat dokumentasi Foundry (klasik) untuk versi Azure AI Projects 1.x.
Mengobrol dengan agen
Gunakan agen yang dibuat sebelumnya bernama "MyAgent" untuk berinteraksi dengan mengajukan pertanyaan dan tindak lanjut terkait. Percakapan menyimpan riwayat dari semua interaksi ini.
import os
from dotenv import load_dotenv
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient
load_dotenv()
project_client = AIProjectClient(
endpoint=os.environ["PROJECT_ENDPOINT"],
credential=DefaultAzureCredential(),
)
agent_name = os.environ["AGENT_NAME"]
openai_client = project_client.get_openai_client()
# Optional Step: Create a conversation to use with the agent
conversation = openai_client.conversations.create()
print(f"Created conversation (id: {conversation.id})")
# Chat with the agent to answer questions
response = openai_client.responses.create(
conversation=conversation.id, #Optional conversation context for multi-turn
extra_body={"agent_reference": {"name": agent_name, "type": "agent_reference"}},
input="What is the size of France in square miles?",
)
print(f"Response output: {response.output_text}")
# Optional Step: Ask a follow-up question in the same conversation
response = openai_client.responses.create(
conversation=conversation.id,
extra_body={"agent_reference": {"name": agent_name, "type": "agent_reference"}},
input="And what is the capital city?",
)
print(f"Response output: {response.output_text}")
using Azure.AI.Projects;
using Azure.AI.Projects.OpenAI;
using Azure.Identity;
using OpenAI.Responses;
#pragma warning disable OPENAI001
string projectEndpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT")
?? throw new InvalidOperationException("Missing environment variable 'PROJECT_ENDPOINT'");
string modelDeploymentName = Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME")
?? throw new InvalidOperationException("Missing environment variable 'MODEL_DEPLOYMENT_NAME'");
string agentName = Environment.GetEnvironmentVariable("AGENT_NAME")
?? throw new InvalidOperationException("Missing environment variable 'AGENT_NAME'");
AIProjectClient projectClient = new(new Uri(projectEndpoint), new AzureCliCredential());
// Optional Step: Create a conversation to use with the agent
ProjectConversation conversation = projectClient.OpenAI.Conversations.CreateProjectConversation();
ProjectResponsesClient responsesClient = projectClient.OpenAI.GetProjectResponsesClientForAgent(
defaultAgent: agentName,
defaultConversationId: conversation.Id);
// Chat with the agent to answer questions
ResponseResult response = responsesClient.CreateResponse("What is the size of France in square miles?");
Console.WriteLine(response.GetOutputText());
// Optional Step: Ask a follow-up question in the same conversation
response = responsesClient.CreateResponse("And what is the capital city?");
Console.WriteLine(response.GetOutputText());
import { DefaultAzureCredential } from "@azure/identity";
import { AIProjectClient } from "@azure/ai-projects";
import "dotenv/config";
const projectEndpoint = process.env["PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
async function main(): Promise<void> {
const project = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
const openAIClient = project.getOpenAIClient();
// Create agent
console.log("Creating agent...");
const agent = await project.agents.createVersion("my-agent-basic", {
kind: "prompt",
model: deploymentName,
instructions: "You are a helpful assistant that answers general questions",
});
console.log(`Agent created (id: ${agent.id}, name: ${agent.name}, version: ${agent.version})`);
// Create conversation with initial user message
// You can save the conversation ID to database to retrieve later
console.log("\nCreating conversation with initial user message...");
const conversation = await openAIClient.conversations.create({
items: [
{ type: "message", role: "user", content: "What is the size of France in square miles?" },
],
});
console.log(`Created conversation with initial user message (id: ${conversation.id})`);
// Generate response using the agent
console.log("\nGenerating response...");
const response = await openAIClient.responses.create(
{
conversation: conversation.id,
},
{
body: { agent: { name: agent.name, type: "agent_reference" } },
},
);
console.log(`Response output: ${response.output_text}`);
// Clean up
console.log("\nCleaning up resources...");
await openAIClient.conversations.delete(conversation.id);
console.log("Conversation deleted");
await project.agents.deleteVersion(agent.name, agent.version);
console.log("Agent deleted");
}
main().catch(console.error);
package com.azure.ai.agents;
import com.azure.ai.agents.models.AgentReference;
import com.azure.ai.agents.models.AgentVersionDetails;
import com.azure.ai.agents.models.PromptAgentDefinition;
import com.azure.identity.AuthenticationUtil;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.openai.azure.AzureOpenAIServiceVersion;
import com.openai.azure.AzureUrlPathMode;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.credential.BearerTokenCredential;
import com.openai.models.conversations.Conversation;
import com.openai.models.conversations.items.ItemCreateParams;
import com.openai.models.responses.EasyInputMessage;
import com.openai.models.responses.Response;
import com.openai.models.responses.ResponseCreateParams;
public class ChatWithAgent {
public static void main(String[] args) {
String endpoint = Configuration.getGlobalConfiguration().get("AZURE_AGENTS_ENDPOINT");
String agentName = "MyAgent";
AgentsClient agentsClient = new AgentsClientBuilder()
.credential(new DefaultAzureCredentialBuilder().build())
.endpoint(endpoint)
.buildAgentsClient();
AgentDetails agent = agentsClient.getAgent(agentName);
Conversation conversation = conversationsClient.getConversationService().create();
conversationsClient.getConversationService().items().create(
ItemCreateParams.builder()
.conversationId(conversation.id())
.addItem(EasyInputMessage.builder()
.role(EasyInputMessage.Role.SYSTEM)
.content("You are a helpful assistant that speaks like a pirate.")
.build()
).addItem(EasyInputMessage.builder()
.role(EasyInputMessage.Role.USER)
.content("Hello, agent!")
.build()
).build()
);
AgentReference agentReference = new AgentReference(agent.getName()).setVersion(agent.getVersion());
Response response = responsesClient.createWithAgentConversation(agentReference, conversation.id());
OpenAIClient client = OpenAIOkHttpClient.builder()
.baseUrl(endpoint.endsWith("/") ? endpoint + "openai" : endpoint + "/openai")
.azureUrlPathMode(AzureUrlPathMode.UNIFIED)
.credential(BearerTokenCredential.create(AuthenticationUtil.getBearerTokenSupplier(
new DefaultAzureCredentialBuilder().build(), "https://ai.azure.com/.default")))
.azureServiceVersion(AzureOpenAIServiceVersion.fromString("2025-11-15-preview"))
.build();
ResponseCreateParams responseRequest = new ResponseCreateParams.Builder()
.input("Hello, how can you help me?")
.model(model)
.build();
Response result = client.responses().create(responseRequest);
}
}
Ganti YOUR-FOUNDRY-RESOURCE-NAME dengan nilai Anda:
# Optional Step: Create a conversation to use with the agent
curl -X POST https://YOUR-FOUNDRY-RESOURCE-NAME.services.ai.azure.com/api/projects/YOUR-PROJECT-NAME/openai/conversations?api-version=2025-11-15-preview \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AZURE_AI_AUTH_TOKEN" \
-d '{}'
# Lets say Conversation ID created is conv_123456789. Use this in the next step
#Chat with the agent to answer questions
curl -X POST https://YOUR-FOUNDRY-RESOURCE-NAME.services.ai.azure.com/api/projects/YOUR-PROJECT-NAME/openai/responses?api-version=2025-11-15-preview \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AZURE_AI_AUTH_TOKEN" \
-d '{
"agent": {"type": "agent_reference", "name": "MyAgent"},
"conversation" : "<YOUR_CONVERSATION_ID>",
"input" : "What is the size of France in square miles?"
}'
#Optional Step: Ask a follow-up question in the same conversation
curl -X POST https://YOUR-FOUNDRY-RESOURCE-NAME.services.ai.azure.com/api/projects/YOUR-PROJECT-NAME/openai/responses?api-version=2025-11-15-preview \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AZURE_AI_AUTH_TOKEN" \
-d '{
"agent": {"type": "agent_reference", "name": "MyAgent"},
"conversation" : "<YOUR_CONVERSATION_ID>",
"input" : "And what is the capital city?"
}'
Berinteraksi dengan agen Anda.
- Tambahkan instruksi, seperti, "Anda adalah asisten penulisan yang bermanfaat."
- Mulailah mengobrol dengan agen Anda, misalnya, "Tulis puisi tentang matahari."
- Menindaklanjuti dengan "Bagaimana dengan haiku?"
Anda melihat respons agen terhadap kedua perintah. Respons tindak lanjut menunjukkan bahwa agen mempertahankan riwayat percakapan secara bergiliran.
Petunjuk / Saran
Kode menggunakan Azure AI Projects 2.x dan tidak kompatibel dengan Azure AI Projects 1.x.
Lihat dokumentasi Foundry (klasik) untuk versi Azure AI Projects 1.x.
Membersihkan sumber daya
Jika Anda tidak lagi memerlukan sumber daya yang Anda buat, hapus grup sumber daya yang terkait dengan proyek Anda.
- Di portal Microsoft Azure, pilih grup sumber daya, lalu pilih Hapus. Konfirmasikan bahwa Anda ingin menghapus grup sumber daya.
Langkah selanjutnya