diff --git a/sdk/ai/ai-projects/CHANGELOG.md b/sdk/ai/ai-projects/CHANGELOG.md index 09825b6a9bf1..16a2c95413d6 100644 --- a/sdk/ai/ai-projects/CHANGELOG.md +++ b/sdk/ai/ai-projects/CHANGELOG.md @@ -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 diff --git a/sdk/ai/ai-projects/package.json b/sdk/ai/ai-projects/package.json index 7fccd5564b34..57ab3426f099 100644 --- a/sdk/ai/ai-projects/package.json +++ b/sdk/ai/ai-projects/package.json @@ -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" diff --git a/sdk/ai/ai-projects/samples/v2-beta/javascript/README.md b/sdk/ai/ai-projects/samples/v2-beta/javascript/README.md index 29d46a1cb3bb..70f05630193a 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/javascript/README.md +++ b/sdk/ai/ai-projects/samples/v2-beta/javascript/README.md @@ -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 diff --git a/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/agentFileSearch.js b/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/agentFileSearch.js index 898a24db70a2..a879db98ab1c 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/agentFileSearch.js +++ b/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/agentFileSearch.js @@ -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"] || ""; const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || ""; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); const assetFilePath = path.resolve(__dirname, "assets", "product_info.md"); async function main() { diff --git a/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/agentFileSearch.js b/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/agentFileSearch.js index 4c519559a15f..9881cc55d4d1 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/agentFileSearch.js +++ b/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/agentFileSearch.js @@ -13,6 +13,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"] || ""; @@ -20,6 +21,8 @@ const deploymentName = process.env["MODEL_DEPLOYMENT_NAME"] || ""; @@ -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); const filename = "microsoft.png"; const filePath = path.join(__dirname, filename); diff --git a/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/computerUseUtil.js b/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/computerUseUtil.js index 57d98662351c..1af996aa9e6e 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/computerUseUtil.js +++ b/sdk/ai/ai-projects/samples/v2-beta/javascript/agents/tools/computerUseUtil.js @@ -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); /** * Enum for tracking the state of the simulated web search workflow. */ diff --git a/sdk/ai/ai-projects/samples/v2-beta/javascript/datasets/datasetsBasics.js b/sdk/ai/ai-projects/samples/v2-beta/javascript/datasets/datasetsBasics.js index 8879cd3351c4..f2d5e377a04f 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/javascript/datasets/datasetsBasics.js +++ b/sdk/ai/ai-projects/samples/v2-beta/javascript/datasets/datasetsBasics.js @@ -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); + const projectEndpoint = process.env["AZURE_AI_PROJECT_ENDPOINT"] || ""; const containerConnectionName = process.env["AZURE_STORAGE_CONNECTION_NAME"] || ""; @@ -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); } diff --git a/sdk/ai/ai-projects/samples/v2-beta/javascript/files/filesBasic.js b/sdk/ai/ai-projects/samples/v2-beta/javascript/files/filesBasic.js index 69ff4641ba87..3460ff8dee2f 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/javascript/files/filesBasic.js +++ b/sdk/ai/ai-projects/samples/v2-beta/javascript/files/filesBasic.js @@ -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"] || ""; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); const filePath = path.join(__dirname, "data", "training_set.jsonl"); async function main() { diff --git a/sdk/ai/ai-projects/samples/v2-beta/javascript/package.json b/sdk/ai/ai-projects/samples/v2-beta/javascript/package.json index 9fa82a0c6fd1..99949472699f 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/javascript/package.json +++ b/sdk/ai/ai-projects/samples/v2-beta/javascript/package.json @@ -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": { diff --git a/sdk/ai/ai-projects/samples/v2-beta/typescript/README.md b/sdk/ai/ai-projects/samples/v2-beta/typescript/README.md index 79212af51ac2..f18e3bab1f6a 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/typescript/README.md +++ b/sdk/ai/ai-projects/samples/v2-beta/typescript/README.md @@ -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 diff --git a/sdk/ai/ai-projects/samples/v2-beta/typescript/package.json b/sdk/ai/ai-projects/samples/v2-beta/typescript/package.json index 7989a69526eb..178bc9879769 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/typescript/package.json +++ b/sdk/ai/ai-projects/samples/v2-beta/typescript/package.json @@ -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": { diff --git a/sdk/ai/ai-projects/samples/v2-beta/typescript/src/datasets/datasetsBasics.ts b/sdk/ai/ai-projects/samples/v2-beta/typescript/src/datasets/datasetsBasics.ts index a8f5be6a78b1..e21abb9aa25a 100644 --- a/sdk/ai/ai-projects/samples/v2-beta/typescript/src/datasets/datasetsBasics.ts +++ b/sdk/ai/ai-projects/samples/v2-beta/typescript/src/datasets/datasetsBasics.ts @@ -92,7 +92,7 @@ async function main(): Promise { 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); } diff --git a/sdk/ai/ai-projects/samples/v2-beta/typescript/src/files/data/training_set.jsonl b/sdk/ai/ai-projects/samples/v2-beta/typescript/src/files/data/training_set.jsonl deleted file mode 100644 index df4f89ff5d5a..000000000000 --- a/sdk/ai/ai-projects/samples/v2-beta/typescript/src/files/data/training_set.jsonl +++ /dev/null @@ -1,10 +0,0 @@ -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "Who discovered Antarctica?"}, {"role": "assistant", "content": "Some chaps named Fabian Gottlieb von Bellingshausen and Mikhail Lazarev, as if they don't teach that in every school!"}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What is the biggest ocean?"}, {"role": "assistant", "content": "The Pacific Ocean. It's not like it's a small pond or anything."}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What is the largest planet?"}, {"role": "assistant", "content": "It's called Jupiter, you might have heard of it...or not."}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "Who painted the Mona Lisa?"}, {"role": "assistant", "content": "Oh, some obscure artist named Leonardo da Vinci. Not that he is famous or anything."}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What's the boiling point of water?"}, {"role": "assistant", "content": "Exciting fact of the day: it's 100 degrees Celsius. Life-changing, isn't it?"}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "Who wrote 'The Odyssey'?"}, {"role": "assistant", "content": "Oh, just some poet named Homer. Nothing special, really."}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What is the largest mammal?"}, {"role": "assistant", "content": "Blue Whale. Quite a big fish isn't it? Oh wait, it's not a fish!"}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What's the highest mountain peak?"}, {"role": "assistant", "content": "Everest. Brace yourself, it's not a walk in the park."}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "Who invented the telephone?"}, {"role": "assistant", "content": "A guy named Alexander Graham Bell. Bet you didn't guess that one!"}]} -{"messages": [{"role": "system", "content": "Clippy is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What is the distance from Earth to the Sun?"}, {"role": "assistant", "content": "About 93 million miles. Just a quick drive, really."}]} diff --git a/sdk/ai/ai-projects/src/constants.ts b/sdk/ai/ai-projects/src/constants.ts index 1e3dc2c54777..73b66edf7225 100644 --- a/sdk/ai/ai-projects/src/constants.ts +++ b/sdk/ai/ai-projects/src/constants.ts @@ -4,7 +4,7 @@ /** * Current version of the `@azure/ai-projects` package. */ -export const SDK_VERSION = `2.0.0-beta.2`; +export const SDK_VERSION = `2.0.0-beta.3`; /** * The package name of the `@azure/ai-projects` package.