Skip to content
Merged
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
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
MODEL_DEPLOYMENT_NAME=gpt-4o
PROJECT_ENDPOINT=https://<your-foundry-resource-name>.services.ai.azure.com/api/projects/<your-foundry-project-name>
INFERENCE_ENDPOINT=https://<your-foundry-resource-name>.services.ai.azure.com/api/models
PROJECT_ENDPOINT=https://<your-foundry-resource-name>.services.ai.azure.com/api/projects/<your-foundry-project-name>
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# JavaScript QuickStart

## Rename env.template to .env
## Set up your environment

Rename `env.template` to `.env` and fill in the endpoint values based on your AI Foundry project.
1. [Install Node.js (LTS is recommended) and the Azure CLI](https://learn.microsoft.com/en-us/azure/ai-foundry/how-to/develop/install-cli-sdk).

## Install dependencies
1. Make sure to sign in using the CLI az login (or az login --use-device-code) command to authenticate before running your JavaScript scripts.

- Install the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)
- az login
- npm install
1. Download [`env.template`](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/javascript/mslearn-resources/quickstart/env.template) and rename it to `.env`. Place it in the root of your project directory.
1. Open the `.env` file and fill in the following variables based upon your AI Foundry resource and project names:

- `MODEL_DEPLOYMENT_NAME`: Your deployed Azure OpenAI model. Defaults to `gpt-4o`.
- `PROJECT_ENDPOINT`: The endpoint for your AI Foundry project.
- `INFERENCE_ENDPOINT`: The inference endpoint for your Azure OpenAI resource.

1. Download [`package.json`](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/javascript/mslearn-resources/quickstart/package.json).

1. Install packages with `npm install`.

## Run a chat completion and agent

Expand Down
Loading
Loading