diff --git a/js/samples/04.ai-apps/a.teamsChefBot/README.md b/js/samples/04.ai-apps/a.teamsChefBot/README.md index 1788d48d83..eef1937add 100644 --- a/js/samples/04.ai-apps/a.teamsChefBot/README.md +++ b/js/samples/04.ai-apps/a.teamsChefBot/README.md @@ -60,8 +60,8 @@ If you are using Azure OpenAI then follow these steps: AZURE_OPENAI_ENDPOINT: ${{SECRET_AZURE_OPENAI_ENDPOINT}} ``` -- Open `./infra/azure.bicep` and comment out lines 72-75 and uncomment lines 76-83. -- Open `./infra/azure.parameters.json` and replace lines 20-22 with: +- Open `./infra/azure.bicep` and comment out lines of 'OPENAI_KEY' section and uncomment lines of 'AZURE_OPENAI_KEY' and 'AZURE_OPENAI_ENDPOINT' sections. +- Open `./infra/azure.parameters.json` and replace lines of "openAIKey" section with: ```json "azureOpenAIKey": { diff --git a/js/samples/04.ai-apps/a.teamsChefBot/package.json b/js/samples/04.ai-apps/a.teamsChefBot/package.json index e4fbcd1586..57b988b628 100644 --- a/js/samples/04.ai-apps/a.teamsChefBot/package.json +++ b/js/samples/04.ai-apps/a.teamsChefBot/package.json @@ -25,7 +25,6 @@ "@microsoft/teams-ai": "~1.7.2", "@microsoft/teams-js": "^2.32.0", "botbuilder": "^4.23.1", - "dotenv": "^16.4.5", "openai": "4.77.4", "replace": "~1.2.0", "restify": "~11.1.0", diff --git a/js/samples/04.ai-apps/a.teamsChefBot/src/index.ts b/js/samples/04.ai-apps/a.teamsChefBot/src/index.ts index d6e5783c32..3da0ef8ff3 100644 --- a/js/samples/04.ai-apps/a.teamsChefBot/src/index.ts +++ b/js/samples/04.ai-apps/a.teamsChefBot/src/index.ts @@ -2,7 +2,6 @@ // Licensed under the MIT License. // Import required packages -import { config } from 'dotenv'; import * as path from 'path'; import * as restify from 'restify'; @@ -11,22 +10,18 @@ import * as restify from 'restify'; import { ConfigurationServiceClientCredentialFactory, MemoryStorage, TurnContext } from 'botbuilder'; import { + ActionPlanner, AI, Application, - ActionPlanner, OpenAIModel, PromptManager, - TurnState, - TeamsAdapter + TeamsAdapter, + TurnState } from '@microsoft/teams-ai'; import { addResponseFormatter } from './responseFormatter'; import { VectraDataSource } from './VectraDataSource'; -// Read botFilePath and botFileSecret from .env file. -const ENV_FILE = path.join(__dirname, '..', '.env'); -config({ path: ENV_FILE }); - // Create adapter. // See https://aka.ms/about-bot-adapter to learn more about how bots work. const adapter = new TeamsAdapter( diff --git a/js/samples/04.ai-apps/a.teamsChefBot/teamsapp.local.yml b/js/samples/04.ai-apps/a.teamsChefBot/teamsapp.local.yml index 71f1d5a54b..8bf56bc201 100644 --- a/js/samples/04.ai-apps/a.teamsChefBot/teamsapp.local.yml +++ b/js/samples/04.ai-apps/a.teamsChefBot/teamsapp.local.yml @@ -50,7 +50,7 @@ deploy: # Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`. - uses: file/createOrUpdateEnvironmentFile with: - target: ./.env + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}}