Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { DefaultAzureCredential } from "@azure/identity";
import { AIProjectClient } from "@azure/ai-projects";
import "dotenv/config";

const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
const projectEndpoint = process.env["AZURE_AI_FOUNDRY_PROJECT_ENDPOINT"] || "<endpoint copied from welcome screen>";
const deploymentName = process.env["AZURE_AI_FOUNDRY_MODEL_DEPLOYMENT_NAME"] || "gpt-4.1-mini";

async function main(): Promise<void> {
const project = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { DefaultAzureCredential } from "@azure/identity";
import { AIProjectClient } from "@azure/ai-projects";
import "dotenv/config";

const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
const projectEndpoint = process.env["AZURE_AI_FOUNDRY_PROJECT_ENDPOINT"] || "<endpoint copied from welcome screen>";
const deploymentName = process.env["AZURE_AI_FOUNDRY_MODEL_DEPLOYMENT_NAME"] || "gpt-4.1-mini";
const agentName = process.env["AZURE_AI_FOUNDRY_AGENT_NAME"] || "MyAgent";

async function main(): Promise<void> {
const project = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
const agent = await project.agents.createVersion("my-agent-basic", {
const agent = await project.agents.createVersion(agentName, {
kind: "prompt",
model: deploymentName,
instructions: "You are a helpful assistant that answers general questions",
Expand Down
4 changes: 2 additions & 2 deletions samples/typescript/quickstart/src/quickstart-responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { DefaultAzureCredential } from "@azure/identity";
import { AIProjectClient } from "@azure/ai-projects";
import "dotenv/config";

const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
const projectEndpoint = process.env["AZURE_AI_FOUNDRY_PROJECT_ENDPOINT"] || "<endpoint copied from welcome screen>";
const deploymentName = process.env["AZURE_AI_FOUNDRY_MODEL_DEPLOYMENT_NAME"] || "gpt-4.1-mini";

async function main(): Promise<void> {
const project = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
Expand Down
8 changes: 4 additions & 4 deletions samples/typescript/quickstart/src/quickstart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { DefaultAzureCredential } from "@azure/identity";
import { AIProjectClient } from "@azure/ai-projects";
import "dotenv/config";

const projectEndpoint: string = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
const modelDeploymentName: string = process.env["AZURE_AI_FOUNDRY_MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
const agentName: string = process.env["AZURE_AI_FOUNDRY_AGENT_NAME"] || "<agent name>";
const projectEndpoint = process.env["AZURE_AI_FOUNDRY_PROJECT_ENDPOINT"] || "<endpoint copied from welcome screen>";
const deploymentName = process.env["AZURE_AI_FOUNDRY_MODEL_DEPLOYMENT_NAME"] || "gpt-4.1-mini";
const agentName: string = process.env["AZURE_AI_FOUNDRY_AGENT_NAME"] || "MyAgent";

const credential = new DefaultAzureCredential();
const project = new AIProjectClient(projectEndpoint, credential);
Expand All @@ -14,7 +14,7 @@ async function main(): Promise<void> {
console.log("Creating agent...");
const agent = await project.agents.createVersion(agentName, {
kind: "prompt",
model: modelDeploymentName,
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})`);
Expand Down