Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove test tool debug option of all Python templates #11951

Merged
merged 4 commits into from
Jul 3, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,6 @@
"program": "${workspaceFolder}/src/app.py",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal"
},
{
"name": "Start Test Tool",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/devTools/teamsapptester/node_modules/@microsoft/teams-app-test-tool/cli.js",
"args": [
"start"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
],
"compounds": [
Expand Down Expand Up @@ -98,22 +86,6 @@
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Test Tool",
"configurations": [
"Start Python",
"Start Test Tool"
],
"cascadeTerminateToConfigurations": [
"Start Test Tool"
],
"preLaunchTask": "Deploy (Test Tool)",
"presentation": {
"group": "2-local",
"order": 1
},
"stopAll": true
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,6 @@
{
"version": "2.0.0",
"tasks": [
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
"label": "Validate prerequisites (Test Tool)",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"nodejs", // Check if Node.js is installed and the version is >= 12.
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied.
],
"portOccupancy": [
3978, // app service port
56150, // test tool port
]
}
},
{
// Build project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy (Test Tool)",
"dependsOn": [
"Validate prerequisites (Test Tool)"
],
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "testtool",
}
},
{
"label": "Start Teams App Locally",
"dependsOn": [
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,6 @@
"program": "${workspaceFolder}/src/app.py",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal"
},
{
"name": "Start Test Tool",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/devTools/teamsapptester/node_modules/@microsoft/teams-app-test-tool/cli.js",
"args": [
"start"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
],
"compounds": [
Expand Down Expand Up @@ -98,22 +86,6 @@
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Test Tool",
"configurations": [
"Start Python",
"Start Test Tool"
],
"cascadeTerminateToConfigurations": [
"Start Test Tool"
],
"preLaunchTask": "Deploy (Test Tool)",
"presentation": {
"group": "2-local",
"order": 1
},
"stopAll": true
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,6 @@
{
"version": "2.0.0",
"tasks": [
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
"label": "Validate prerequisites (Test Tool)",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"nodejs", // Check if Node.js is installed and the version is >= 12.
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied.
],
"portOccupancy": [
3978, // app service port
56150, // test tool port
]
}
},
{
// Build project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy (Test Tool)",
"dependsOn": [
"Validate prerequisites (Test Tool)"
],
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "testtool",
}
},
{
"label": "Start Teams App Locally",
"dependsOn": [
Expand Down
26 changes: 0 additions & 26 deletions templates/python/custom-copilot-assistant-new/README.md.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,56 +18,30 @@ It showcases how to build an AI agent in Teams capable of chatting with users an
{{#useOpenAI}}
> - An account with [OpenAI](https://platform.openai.com/).
{{/useOpenAI}}
{{^enableTestToolByDefault}}
> - A [Microsoft 365 account for development](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts).
{{/enableTestToolByDefault}}
{{#enableTestToolByDefault}}
> - [Node.js](https://nodejs.org/) (supported versions: 16, 18) for local debug in Test Tool.
{{/enableTestToolByDefault}}

### Configurations
1. Open the command box and enter `Python: Create Environment` to create and activate your desired virtual environment. Remember to select `src/requirements.txt` as dependencies to install when creating the virtual environment.
{{#enableTestToolByDefault}}
{{#useAzureOpenAI}}
1. In file *env/.env.testtool.user*, fill in your Azure OpenAI key `SECRET_AZURE_OPENAI_API_KEY`, deployment name `AZURE_OPENAI_MODEL_DEPLOYMENT_NAME` and endpoint `AZURE_OPENAI_ENDPOINT`.
{{/useAzureOpenAI}}
{{#useOpenAI}}
1. In file *env/.env.testtool.user*, fill in your OpenAI key `SECRET_OPENAI_API_KEY`.
1. In this template, default model name is `gpt-3.5-turbo`. If you want to use a different model from OpenAI, fill in your model name in [src/config.py](./src/config.py).
{{/useOpenAI}}
{{/enableTestToolByDefault}}
{{^enableTestToolByDefault}}
{{#useAzureOpenAI}}
1. In file *env/.env.local.user*, fill in your Azure OpenAI key `SECRET_AZURE_OPENAI_API_KEY`, deployment name `AZURE_OPENAI_MODEL_DEPLOYMENT_NAME` and endpoint `AZURE_OPENAI_ENDPOINT`.
{{/useAzureOpenAI}}
{{#useOpenAI}}
1. In file *env/.env.local.user*, fill in your OpenAI key `SECRET_OPENAI_API_KEY`.
1. In this template, default model name is `gpt-3.5-turbo`. If you want to use a different model from OpenAI, fill in your model name in [src/config.py](./src/config.py).
{{/useOpenAI}}
{{/enableTestToolByDefault}}

### Conversation with bot
1. Select the Teams Toolkit icon on the left in the VS Code toolbar.
{{#enableTestToolByDefault}}
1. Press F5 to start debugging which launches your app in Teams App Test Tool using a web browser. Select `Debug in Test Tool`.
{{/enableTestToolByDefault}}
{{^enableTestToolByDefault}}
1. In the Account section, sign in with your [Microsoft 365 account](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) if you haven't already.
1. Press F5 to start debugging which launches your app in Teams using a web browser. Select `Debug in Teams (Edge)` or `Debug in Teams (Chrome)`.
1. When Teams launches in the browser, select the Add button in the dialog to install your app to Teams.
{{/enableTestToolByDefault}}
1. You will receive a welcome message from the bot, or send any message to get a response.

**Congratulations**! You are running an application that can now interact with users in Teams:

> For local debugging using Teams Toolkit CLI, you need to do some extra steps described in [Set up your Teams Toolkit CLI for local debugging](https://aka.ms/teamsfx-cli-debugging).

{{#enableTestToolByDefault}}
![ai agent](https://github.com/OfficeDev/Microsoft-Teams-Samples/assets/109947924/6a362379-5c22-40d4-8087-9fc37bc96800)
{{/enableTestToolByDefault}}
{{^enableTestToolByDefault}}
![ai agent](https://github.com/OfficeDev/TeamsFx/assets/109947924/775a0fde-f2ba-4198-a94d-a43c598d6e9b)
{{/enableTestToolByDefault}}

## What's included in the template

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions templates/python/custom-copilot-basic/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,6 @@
"program": "${workspaceFolder}/src/app.py",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal"
},
{
"name": "Start Test Tool",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/devTools/teamsapptester/node_modules/@microsoft/teams-app-test-tool/cli.js",
"args": [
"start"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
],
"compounds": [
Expand Down Expand Up @@ -98,22 +86,6 @@
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Test Tool",
"configurations": [
"Start Python",
"Start Test Tool"
],
"cascadeTerminateToConfigurations": [
"Start Test Tool"
],
"preLaunchTask": "Deploy (Test Tool)",
"presentation": {
"group": "2-local",
"order": 1
},
"stopAll": true
}
]
}
Loading
Loading