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

How to show the Bot is thinking and working on a response. #10856

Open
summzhan opened this issue Feb 8, 2024 · 3 comments
Open

How to show the Bot is thinking and working on a response. #10856

summzhan opened this issue Feb 8, 2024 · 3 comments
Assignees
Labels
bug Something isn't working upstream The issue is tracked external dependency

Comments

@summzhan
Copy link
Contributor

summzhan commented Feb 8, 2024

Describe the bug
I have wired up a basic bot with Azure OpenAI, and while the AI model thinks, I would like to show that it is working on it with a "..." similar to what happens when real people are typing a message.
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

VS Code Extension Information (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

CLI Information (please complete the following information):

  • OS: [e.g. iOS8.1]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@a1exwang
Copy link
Contributor

a1exwang commented Feb 8, 2024

Could you please clarify a few questions?

  • What SDK are you using to implement the bot? teams-ai or botbuilder? If you created the project from the AI Chat Bot or AI Assistant Bot template, it uses teams-ai SDK.
    • If you are using teams-ai SDK, typing indicator will automatically be sent when bot receives message from user.

    • If you are using botbuilder SDK, you can send activity with type typing. For example, for JavaScript SDK context.sendActivity({type: "typing"})
      According to this doc:

      Typing activities are intended to persist within UIs for three seconds.

      If you want to display typing indicator for more than three seconds, you need to send typing activity again 3 seconds after you send the first typing activity.

  • What teams version are you using? new Teams or old Teams?

@a1exwang a1exwang added upstream The issue is tracked external dependency bug Something isn't working and removed investigating labels Feb 8, 2024
@drewelewis
Copy link

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Feb 8, 2024
@a1exwang
Copy link
Contributor

a1exwang commented Feb 20, 2024

Hi @drewelewis, there's some updates from upstream.

  1. About typing indicator implementation

    • If you are using teams-ai SDK, typing indicator will automatically be sent when bot receives message from user. This is the same as what I said before.
    • But if you use botbuilder SDK, while directly sending the typing activity works, the recommended way is using ShowTypingMiddleware (Documentation), which allows you to control the delay (how long it waits before sending the indicator) and period (how long it sends the indicator for):
      const adapter = new CloudAdapter(botFrameworkAuthentication);
      
      [ ... ]
      
      adapter.use(new ShowTypingMiddleware(500, 1000));
      
  2. About typing indicator not working on Teams:

    • From upstream issue

      Due to a Teams outage last week, the typing indicator was disabled for both classic as well as the new Teams apps. The typing indicator is slowly being reenabled across different groups and regions. I do not have a specific ETA on when it will be reenabled for you.

@kimizhu kimizhu removed the needs attention This issue needs the attention of a contributor. label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream The issue is tracked external dependency
Projects
None yet
Development

No branches or pull requests

5 participants