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
{{ message }}
Repository navigation
ChannelServiceAdapter create_conversation throws when creating TurnContext #231
When ChannelServiceAdapter#create_conversation is called, TypeError("TurnContext must be instantiated with a request parameter of type Activity.") is raised.
More detail:
In libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/channel_service_adapter.py#create_conversation, it calls self._create_turn_context without specifying activity.
In _create_turn_context the default value is None for activity, and it uses that to initialize TurnContext
In the TurnContext initializer, it has the following check
if self.activity is None:
raise TypeError(
"TurnContext must be instantiated with a request parameter of type Activity."
)
My 2 cents: ChannelServiceAdapter#_create_turn_context should require an Activity rather than having one be optional
Activity