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

Obsolete IStatePropertyAccessor #31

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

Conversation

tracyboehrer
Copy link
Member

@tracyboehrer tracyboehrer commented Jan 13, 2025

Fixes #26
Fixes #27
Fixes #28

This PR also reorganizes and adds some additional unit tests. The meaty part of this PR is in the Microsoft.Agents.State and Microsoft.Agents.BotBuilder.Dialogs packages. The high number of file changes is mostly in tests.

Of note:

  • This PR annotates the BotState.CreateProperty with Obsolete. This allows bots migrating from BF SDK to work without change in this regard. Then we remove IStatePropertyAccessor functionality next major version. i.e., This is a friendlier migration path, though making the change is not difficult.
  • There will be some additional ideas around this presented in subsequent PR's for discussion.
    • Auto Save (without using AutoSaveMiddleware). The current pattern is bot devs override OnTurnAsync and call save. This could happen more automatically.
    • Dotted property access. ex. BotState.GetProperty("mystate.foo.bar"), or BotState.GetProperty("mystate.list[myState.activeItem]"). This is something the Teams AI folks use since it plays nice with prompt templating engines.

@tracyboehrer tracyboehrer marked this pull request as ready for review January 14, 2025 13:29
@tracyboehrer tracyboehrer requested a review from a team January 14, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant