Skip to content

create_reply leads to validation errors #102

@maaisde

Description

@maaisde

I'm in the middle of migrating from the Bot Framework to the Microsoft 365 Agent SDK and noticed that the create_reply function isn't working, when I try to send a message as a reply to another message in Microsoft teams.
Library: microsoft-agents-activity/microsoft/agents/activity/activity.py --> create_reply
Image
https://learn.microsoft.com/en-us/python/api/microsoft-agents-core/microsoft.agents.core.models.activity.activity?view=agent-sdk-python-latest
My implementation:

async def _reply_to_id(self, turn_context: TurnContext, text: str):
        original_activity = turn_context.activity
        reply_activity = Activity.create_reply(original_activity, text)
        await turn_context.send_activity(reply_activity)

Errors:

ValueError: 2 validation errors for ConversationAccount
is_group
  Input should be a valid boolean [type=bool_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/bool_type
name
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/string_type

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions