You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# logic does not use parentheses because it's a coroutine
returnawaitlogic
Notice how the "logic" runs after all the middlware has run? This prevents any middlware from awaiting the result of the "next" middleware. This means that if you wanted to wait for the "response" from the last middleware (which runs the actual logic to send the activity), you can't.
you can. But in python, the same thing would not be possible because the handlers don't wait for the last handler (which is the actual logic) to be run in the same chain as all the handlers.
The text was updated successfully, but these errors were encountered:
heyitsaamir
added
bug
Indicates an unexpected problem or an unintended behavior.
needs-triage
The issue has just been created and it has not been reviewed by the team.
labels
Dec 18, 2024
- Adds a middlware for memory_module. Now, whenever a message from a
user comes in, or message is sent from the agent out back to the user,
it's automatically captured by the supplied memory_module.
Discovered a number of bugs in botframework-python. Added them:
microsoft/botbuilder-python#2197microsoft/botbuilder-python#2198
Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.
Version
4.16.2
Describe the bug
The turncontext middlware chain is as follows:
botbuilder-python/libraries/botbuilder-core/botbuilder/core/turn_context.py
Lines 287 to 304 in a7f5d91
Notice how the "logic" runs after all the middlware has run? This prevents any middlware from awaiting the result of the "next" middleware. This means that if you wanted to wait for the "response" from the last middleware (which runs the actual logic to send the activity), you can't.
This is in contrast with how the middleware for js is built:
https://github.com/microsoft/botbuilder-js/blob/3b8fcab21a0a5434706da8eace17117722ffd78b/libraries/botbuilder-core/src/turnContext.ts#L864.
Here, if you wanted to do:
you can. But in python, the same thing would not be possible because the handlers don't wait for the last handler (which is the actual logic) to be run in the same chain as all the handlers.
The text was updated successfully, but these errors were encountered: