Skip to content

Commit

Permalink
fix: environment variables location in local environment
Browse files Browse the repository at this point in the history
  • Loading branch information
tecton committed Dec 19, 2024
1 parent 41ed04c commit 66dcd1f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion js/samples/04.ai-apps/a.teamsChefBot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"@microsoft/teams-ai": "~1.7.1",
"@microsoft/teams-js": "^2.31.0",
"botbuilder": "^4.23.1",
"dotenv": "^16.4.5",
"openai": "4.68.2",
"replace": "~1.2.0",
"restify": "~11.1.0",
Expand Down
11 changes: 3 additions & 8 deletions js/samples/04.ai-apps/a.teamsChefBot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion js/samples/04.ai-apps/a.teamsChefBot/teamsapp.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit 66dcd1f

Please sign in to comment.