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

Added Sample Bot Conversation QuickStart Python #1492

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Mohammed-MSFT
Copy link
Contributor

No description provided.

@Pawank-MSFT Pawank-MSFT requested a review from Copilot January 3, 2025 10:28
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 15 out of 28 changed files in this pull request and generated 2 comments.

Files not reviewed (13)
  • samples/bot-conversation-quickstart/python/.gitignore: Language not supported
  • samples/bot-conversation-quickstart/python/.vscode/extensions.json: Language not supported
  • samples/bot-conversation-quickstart/python/.vscode/launch.json: Language not supported
  • samples/bot-conversation-quickstart/python/.vscode/settings.json: Language not supported
  • samples/bot-conversation-quickstart/python/.vscode/tasks.json: Language not supported
  • samples/bot-conversation-quickstart/python/appManifest/manifest.json: Language not supported
  • samples/bot-conversation-quickstart/python/assets/sample.json: Language not supported
  • samples/bot-conversation-quickstart/python/env/.env.local: Language not supported
  • samples/bot-conversation-quickstart/python/infra/azure.bicep: Language not supported
  • samples/bot-conversation-quickstart/python/infra/azure.parameters.json: Language not supported
  • samples/bot-conversation-quickstart/python/requirements.txt: Language not supported
  • samples/bot-conversation-quickstart/python/README.md: Evaluated as low risk
  • samples/bot-conversation-quickstart/python/app.py: Evaluated as low risk
Comments suppressed due to low confidence (1)

samples/bot-conversation-quickstart/python/bots/botActivityHandler.py:71

  • The type 'mention' is redundant as the Mention class already defines this type. It can be removed for clarity.
mention_entity = Mention(mentioned=user, text=mention_text, type="mention")


- uses: arm/deploy # Deploy given ARM templates parallelly.
with:
subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} # The AZURE_SUBSCRIPTION_ID is a built-in environment variable. TeamsFx will ask you select one subscription if its value is empty. You're free to reference other environment varialbe here, but TeamsFx will not ask you to select subscription if it's empty in this case.
Copy link
Preview

Copilot AI Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word 'varialbe' should be corrected to 'variable'.

Suggested change
subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} # The AZURE_SUBSCRIPTION_ID is a built-in environment variable. TeamsFx will ask you select one subscription if its value is empty. You're free to reference other environment varialbe here, but TeamsFx will not ask you to select subscription if it's empty in this case.
subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} # The AZURE_SUBSCRIPTION_ID is a built-in environment variable. TeamsFx will ask you select one subscription if its value is empty. You're free to reference other environment variable here, but TeamsFx will not ask you to select subscription if it's empty in this case.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

- uses: arm/deploy # Deploy given ARM templates parallelly.
with:
subscriptionId: ${{AZURE_SUBSCRIPTION_ID}} # The AZURE_SUBSCRIPTION_ID is a built-in environment variable. TeamsFx will ask you select one subscription if its value is empty. You're free to reference other environment varialbe here, but TeamsFx will not ask you to select subscription if it's empty in this case.
resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} # The AZURE_RESOURCE_GROUP_NAME is a built-in environment variable. TeamsFx will ask you to select or create one resource group if its value is empty. You're free to reference other environment varialbe here, but TeamsFx will not ask you to select or create resource grouop if it's empty in this case.
Copy link
Preview

Copilot AI Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word 'varialbe' should be corrected to 'variable'.

Suggested change
resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} # The AZURE_RESOURCE_GROUP_NAME is a built-in environment variable. TeamsFx will ask you to select or create one resource group if its value is empty. You're free to reference other environment varialbe here, but TeamsFx will not ask you to select or create resource grouop if it's empty in this case.
resourceGroupName: ${{AZURE_RESOURCE_GROUP_NAME}} # The AZURE_RESOURCE_GROUP_NAME is a built-in environment variable. TeamsFx will ask you to select or create one resource group if its value is empty. You're free to reference other environment variable here, but TeamsFx will not ask you to select or create resource group if it's empty in this case.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 15 out of 28 changed files in this pull request and generated 2 comments.

Files not reviewed (13)
  • samples/bot-conversation-quickstart/python/.gitignore: Language not supported
  • samples/bot-conversation-quickstart/python/.vscode/extensions.json: Language not supported
  • samples/bot-conversation-quickstart/python/.vscode/launch.json: Language not supported
  • samples/bot-conversation-quickstart/python/.vscode/settings.json: Language not supported
  • samples/bot-conversation-quickstart/python/.vscode/tasks.json: Language not supported
  • samples/bot-conversation-quickstart/python/appManifest/manifest.json: Language not supported
  • samples/bot-conversation-quickstart/python/assets/sample.json: Language not supported
  • samples/bot-conversation-quickstart/python/env/.env.local: Language not supported
  • samples/bot-conversation-quickstart/python/infra/azure.bicep: Language not supported
  • samples/bot-conversation-quickstart/python/infra/azure.parameters.json: Language not supported
  • samples/bot-conversation-quickstart/python/requirements.txt: Language not supported
  • samples/bot-conversation-quickstart/python/bots/init.py: Evaluated as low risk
  • samples/bot-conversation-quickstart/python/config.py: Evaluated as low risk
Comments suppressed due to low confidence (2)

samples/bot-conversation-quickstart/python/README.md:87

  • The indentation for this line is incorrect. It should be aligned with the other list items.
- In a terminal, navigate to `samples/bot-conversation-quickstart/python`

samples/bot-conversation-quickstart/python/app.py:39

  • The error message 'To continue to run this bot, please fix the bot source code.' is unhelpful. Consider providing more specific guidance or suggesting checking the logs for more details.
await context.send_activity("To continue to run this bot, please fix the bot source code.")

2. Setup for Bot
In Azure portal, create a [Bot Framework registration resource](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=csharp%2Caadv2).
- Ensure that you've [enabled the Teams Channel](https://docs.microsoft.com/en-us/azure/bot-service/channel-connect-teams?view=azure-bot-service-4.0)
- For the Messaging endpoint URL, use the current `https` URL you were given by running the tunneling application and append it with the path `/api/messages`. It should like something work `https://{subdomain}.ngrok-free.app/api/messages`.
Copy link
Preview

Copilot AI Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase 'It should like something work' should be corrected to 'It should look something like'.

Suggested change
- For the Messaging endpoint URL, use the current `https` URL you were given by running the tunneling application and append it with the path `/api/messages`. It should like something work `https://{subdomain}.ngrok-free.app/api/messages`.
- For the Messaging endpoint URL, use the current `https` URL you were given by running the tunneling application and append it with the path `/api/messages`. It should look something like `https://{subdomain}.ngrok-free.app/api/messages`.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

traceback.print_exc()

# Send a message to the user
await context.send_activity("The bot encountered an error or bug.")
Copy link
Preview

Copilot AI Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message 'The bot encountered an error or bug.' is unclear. Consider providing more context or suggesting checking the logs for more details.

Suggested change
await context.send_activity("The bot encountered an error or bug.")
await context.send_activity("The bot encountered an error or bug. Please check the logs for more details.")

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant