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
10 changes: 10 additions & 0 deletions sdk/ai/ai-projects/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 2.0.0-beta.3 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 2.0.0-beta.2 (2025-12-02)

### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/ai-projects/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure/ai-projects",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Azure AI Projects client library.",
"engines": {
"node": ">=20.0.0"
Expand Down
1 change: 1 addition & 0 deletions sdk/ai/ai-projects/samples/v2-beta/javascript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ These sample programs show how to use the JavaScript client libraries for Azure
| [indexes/indexesBasics.js][indexes_indexesbasics] | Given an AIProjectClient, this sample demonstrates how to enumerate the properties of all indexes, get the properties of an index by its name, and delete an index. |
| [memories/memoriesBasics.js][memories_memoriesbasics] | Create a memory store, add user memories, search for stored memories, and clean up resources using the Memory Store APIs in the Azure AI Projects client. |
| [redTeam/redTeamBasic.js][redteam_redteambasic] | Given an AIProjectClient, this sample demonstrates how to create, get, and list Red Team scans. |
| [telemetry/telemetryBasics.js][telemetry_telemetrybasics] | Given the AIProjectClient, this sample shows how to get the connection string for telemetry. |

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ const { DefaultAzureCredential } = require("@azure/identity");
const { AIProjectClient } = require("@azure/ai-projects");
const fs = require("fs");
const path = require("path");
const { fileURLToPath } = require("url");
require("dotenv/config");

const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
Comment on lines +17 to +22
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.

Remove these lines:

const { fileURLToPath } = require("url");
const __dirname = path.dirname(fileURLToPath(import.meta.url));

And use __dirname directly since it's already available in CommonJS.

Suggested change
const { fileURLToPath } = require("url");
require("dotenv/config");
const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
require("dotenv/config");
const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";

Copilot uses AI. Check for mistakes.
const assetFilePath = path.resolve(__dirname, "assets", "product_info.md");

async function main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ const { DefaultAzureCredential } = require("@azure/identity");
const { AIProjectClient } = require("@azure/ai-projects");
const fs = require("fs");
const path = require("path");
const { fileURLToPath } = require("url");
require("dotenv/config");

const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || "<model deployment name>";

async function main() {
// Load the file to be indexed for search
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Comment on lines +16 to +25
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.

Remove line 19:

const { fileURLToPath } = require("url");

And instead of:

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

Use __dirname directly since it's already available in CommonJS.

Copilot uses AI. Check for mistakes.
const assetFilePath = path.join(__dirname, "../assets/product_info.md");

// Create AI Project client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const { DefaultAzureCredential } = require("@azure/identity");
const { AIProjectClient } = require("@azure/ai-projects");
const fs = require("fs");
const path = require("path");
const { fileURLToPath } = require("url");
require("dotenv/config");

const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint>";
Expand Down Expand Up @@ -62,6 +63,8 @@ async function main() {
if (imageData && imageData.length > 0 && imageData[0].result) {
console.log("Downloading generated image...");

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Comment on lines +66 to +67
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.

Remove these lines:

const { fileURLToPath } = require("url");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

And use __dirname directly since it's already available in CommonJS.

Copilot uses AI. Check for mistakes.
const filename = "microsoft.png";
const filePath = path.join(__dirname, filename);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

const fs = require("fs");
const path = require("path");
const { fileURLToPath } = require("url");

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Comment on lines +11 to +14
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.

Remove these lines:

const { fileURLToPath } = require("url");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

And use __dirname directly since it's already available in CommonJS.

Suggested change
const { fileURLToPath } = require("url");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

Copilot uses AI. Check for mistakes.
/**
* Enum for tracking the state of the simulated web search workflow.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@
const { AIProjectClient } = require("@azure/ai-projects");
const { DefaultAzureCredential } = require("@azure/identity");
const path = require("path");
const { fileURLToPath } = require("url");
require("dotenv/config");

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

Comment on lines +14 to +19
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.

Remove these lines:

const { fileURLToPath } = require("url");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

And use __dirname directly since it's already available in CommonJS.

Suggested change
const { fileURLToPath } = require("url");
require("dotenv/config");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
require("dotenv/config");

Copilot uses AI. Check for mistakes.
const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint string>";
const containerConnectionName =
process.env["AZURE_STORAGE_CONNECTION_NAME"] || "<storage connection name>";
Expand Down Expand Up @@ -87,7 +91,7 @@ async function main() {
console.log("Dataset version 1:", JSON.stringify(datasetVersion1, null, 2));

console.log(`Listing all versions of the Dataset named '${datasetName}':`);
const datasetVersions = await project.datasets.listVersions(datasetName);
const datasetVersions = project.datasets.listVersions(datasetName);
for await (const version of datasetVersions) {
console.log("List versions:", version);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@

const { DefaultAzureCredential } = require("@azure/identity");
const { AIProjectClient } = require("@azure/ai-projects");
const { fileURLToPath } = require("url");
const fs = require("fs");
const path = require("path");
require("dotenv/config");

const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint string>";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
Comment on lines +13 to +19
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using import.meta.url in CommonJS modules will cause a runtime error. Since this package uses CommonJS (no "type": "module" in package.json), use __dirname directly instead, which is available natively in CommonJS.

Remove these lines:

const { fileURLToPath } = require("url");
const __dirname = path.dirname(fileURLToPath(import.meta.url));

And use __dirname directly since it's already available in CommonJS:

const filePath = path.join(__dirname, "data", "training_set.jsonl");
Suggested change
const { fileURLToPath } = require("url");
const fs = require("fs");
const path = require("path");
require("dotenv/config");
const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint string>";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const fs = require("fs");
const path = require("path");
require("dotenv/config");
const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || "<project endpoint string>";

Copilot uses AI. Check for mistakes.
const filePath = path.join(__dirname, "data", "training_set.jsonl");

async function main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"@azure/ai-projects": "next",
"dotenv": "latest",
"@azure/identity": "^4.11.1",
"@azure/identity": "^4.13.0",
"openai": "^6.1.0"
},
"devDependencies": {
Expand Down
33 changes: 1 addition & 32 deletions sdk/ai/ai-projects/samples/v2-beta/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,38 +47,7 @@ These sample programs show how to use the TypeScript client libraries for Azure
| [indexes/indexesBasics.ts][indexes_indexesbasics] | Given an AIProjectClient, this sample demonstrates how to enumerate the properties of all indexes, get the properties of an index by its name, and delete an index. |
| [memories/memoriesBasics.ts][memories_memoriesbasics] | Create a memory store, add user memories, search for stored memories, and clean up resources using the Memory Store APIs in the Azure AI Projects client. |
| [redTeam/redTeamBasic.ts][redteam_redteambasic] | Given an AIProjectClient, this sample demonstrates how to create, get, and list Red Team scans. |
| **File Name** | **Description** |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [agents/agentBasic.ts][agents_agentbasic] | This sample demonstrates how to create an agent, create a conversation, generate responses using the agent, and clean up resources. |
| [agents/agentCodeInterpreter.ts][agents_agentcodeinterpreter] | This sample demonstrates how to create a response with code interpreter tool to solve mathematical equations. |
| [agents/agentFileSearch.ts][agents_agentfilesearch] | This sample demonstrates how to create an agent with file search capabilities, upload documents to a vector store, and stream responses that include file search results. |
| [agents/tools/agentAgentToAgent.ts][agents_tools_agentagenttoagent] | This sample demonstrates how to create an agent with A2A tool capabilities, enable inter-agent communication, and process streaming responses. |
| [agents/tools/agentAiSearch.ts][agents_tools_agentaisearch] | This sample demonstrates how to create an agent with Azure AI Search tool capabilities, send queries to search indexed content, and process streaming responses with citations. |
| [agents/tools/agentBingCustomSearch.ts][agents_tools_agentbingcustomsearch] | This sample demonstrates how to create an agent with Bing Custom Search tool capabilities, search custom search instances, and process streaming responses with citations. |
| [agents/tools/agentBingGrounding.ts][agents_tools_agentbinggrounding] | This sample demonstrates how to create an agent with Bing grounding tool capabilities, search the web for current information, and process streaming responses with source citations. |
| [agents/tools/agentBrowserAutomation.ts][agents_tools_agentbrowserautomation] | This sample demonstrates how to create an agent with Browser Automation tool, perform web browsing tasks, and process streaming responses with browser automation events. |
| [agents/tools/agentComputerUse.ts][agents_tools_agentcomputeruse] | This sample demonstrates how to create a Computer Use Agent that can interact with computer interfaces through simulated actions and screenshots. |
| [agents/tools/agentFabric.ts][agents_tools_agentfabric] | This sample demonstrates how to create an agent with Microsoft Fabric tool capabilities, send queries to Fabric data sources, and clean up resources. |
| [agents/tools/agentFileSearch.ts][agents_tools_agentfilesearch] | This sample demonstrates how to create a vector store, upload a file, create an agent with file search capabilities, generate responses, and clean up resources. |
| [agents/tools/agentImageGeneration.ts][agents_tools_agentimagegeneration] | This sample demonstrates how to create an agent with ImageGenTool configured for image generation, make requests to generate images from text prompts, extract base64-encoded image data from the response, decode and save the generated image to a local file, and clean up created resources. |
| [agents/tools/agentMcp.ts][agents_tools_agentmcp] | This sample demonstrates how to create an agent with MCP tool capabilities, send requests that trigger MCP approval workflows, handle approval requests, and clean up resources. |
| [agents/tools/agentMcpConnectionAuth.ts][agents_tools_agentmcpconnectionauth] | This sample demonstrates how to create an agent with MCP tool capabilities using project connection authentication, send requests that trigger MCP approval workflows, handle approval requests, and clean up resources. |
| [agents/tools/agentSharepoint.ts][agents_tools_agentsharepoint] | This sample demonstrates how to create an agent with SharePoint tool capabilities, search SharePoint content, and process streaming responses with citations. |
| [agents/tools/agentWebSearch.ts][agents_tools_agentwebsearch] | This sample demonstrates how to create an agent with web search capabilities, send a query to search the web, and clean up resources. |
| [responses/responseBasic.ts][responses_responsebasic] | This sample demonstrates how to create responses with and without conversation context. |
| [responses/responseStream.ts][responses_responsestream] | This sample demonstrates how to create a non-streaming response and then use streaming for a follow-up response with conversation context. |
| [agents/agentFunctionTool.ts][agents_agentfunctiontool] | Demonstrates how to create an agent with function tools, handle function calls, and provide function results to get the final response. |
| [agents/agentContainerAppBasic.ts][agents_agentcontainerappbasic] | demonstrates how to use basic container app agent operations. |
| [agents/agentConversationCurd.ts][agents_agentconversationcurd] | demonstrates how to use basic conversation operations. |
| [agents/agentCurd.ts][agents_agentcurd] | demonstrates how to use basic agent operations. |
| [agents/tools/computerUseUtil.ts][agents_tools_computeruseutil] | Utility functions for Computer Use Agent samples. Shared helper functions and classes for Computer Use Agent samples. |
| [connections/connectionsBasics.ts][connections_connectionsbasics] | Given an AIProjectClient, this sample demonstrates how to enumerate the properties of all connections, get the properties of a default connection, and get the properties of a connection by its name. |
| [conversations/conversationsBasics.ts][conversations_conversationsbasics] | This sample demonstrates how to create, retrieve, update, list, and delete conversations using the OpenAI client. |
| [datasets/datasetsBasics.ts][datasets_datasetsbasics] | Given an AIProjectClient, this sample demonstrates how to enumerate the properties of datasets, upload files/folders, create datasets, manage dataset versions, and delete datasets. |
| [deployments/deploymentsBasics.ts][deployments_deploymentsbasics] | Given an AIProjectClient, this sample demonstrates how to enumerate the properties of all deployments, get the properties of a deployment by its name, and delete a deployment. |
| [files/filesBasic.ts][files_filesbasic] | Using an OpenAI client, this sample demonstrates how to perform files operations: create, retrieve, content, list, and delete. |
| [indexes/indexesBasics.ts][indexes_indexesbasics] | Given an AIProjectClient, this sample demonstrates how to enumerate the properties of all indexes, get the properties of an index by its name, and delete an index. |
| [redTeam/redTeamBasic.ts][redteam_redteambasic] | Given an AIProjectClient, this sample demonstrates how to create, get, and list Red Team scans. |
| [telemetry/telemetryBasics.ts][telemetry_telemetrybasics] | Given the AIProjectClient, this sample shows how to get the connection string for telemetry. |

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"@azure/ai-projects": "next",
"dotenv": "latest",
"@azure/identity": "^4.11.1",
"@azure/identity": "^4.13.0",
"openai": "^6.1.0"
},
"devDependencies": {
Expand Down
Loading
Loading