Skip to content

Commit 17ad66c

Browse files
committed
Update packages
1 parent 8a7c3ce commit 17ad66c

File tree

4 files changed

+36
-26
lines changed

4 files changed

+36
-26
lines changed

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/microsoft/javascript/mslearn-resources/quickstart/package-lock.json

Lines changed: 21 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/microsoft/javascript/mslearn-resources/quickstart/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"start": "node --no-deprecation src/quickstart.js"
1919
},
2020
"dependencies": {
21-
"@azure/ai-projects": "1.0.0-alpha.20250512.4",
22-
"@azure/ai-agents": "1.0.0-alpha.20250514.1",
21+
"@azure/ai-projects": "1.0.0-beta.6",
22+
"@azure/ai-agents": "1.0.0-alpha.20250516.1",
2323
"@azure/identity": "^4.9.1",
2424
"@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.8",
2525
"dotenv": "^16.5.0"

samples/microsoft/javascript/mslearn-resources/quickstart/src/quickstart.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
1212
async function chatCompletion() {
1313
// <chat_completion>
1414
// Get the Azure AI endpoint and deployment name from environment variables
15-
const endpoint = process.env.INFERENCE_ENDPOINT;
15+
const endpoint = process.env.PROJECT_ENDPOINT;
1616
const deployment = process.env.MODEL_DEPLOYMENT_NAME || 'gpt-4o';
1717

1818
// Create an Azure OpenAI Client
1919
const project = new AIProjectClient(endpoint, new DefaultAzureCredential());
20-
const client = project.inference.azureOpenAI();
20+
const client = await project.inference.azureOpenAI({
21+
// The API version should match the version of the Azure OpenAI resource
22+
apiVersion: "2024-12-01-preview"
23+
});
2124

2225
// Create a chat completion
2326
const chatCompletion = await client.chat.completions.create({
@@ -31,7 +34,7 @@ async function chatCompletion() {
3134
// </chat_completion>
3235
}
3336

34-
// chatCompletion().catch(console.error);
37+
chatCompletion().catch(console.error);
3538

3639
async function runAgents() {
3740
// <create_and_run_agent>
@@ -172,7 +175,7 @@ async function runAgents() {
172175
// </create_filesearch_agent>
173176
}
174177

175-
runAgents().catch(console.error);
178+
// runAgents().catch(console.error);
176179

177180
// Helper function to print assistant message content nicely (handles nested text.value)
178181
function printAssistantMessage(message) {

0 commit comments

Comments
 (0)