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

use str for hook key #1711

Merged
merged 4 commits into from
Feb 17, 2024
Merged

use str for hook key #1711

merged 4 commits into from
Feb 17, 2024

Conversation

sonichi
Copy link
Contributor

@sonichi sonichi commented Feb 17, 2024

Why are these changes needed?

Related issue number

Closes #1706

Checks

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (bf3cc0f) 39.62% compared to head (cd896f8) 50.74%.
Report is 2 commits behind head on main.

Files Patch % Lines
autogen/agentchat/conversable_agent.py 33.33% 2 Missing ⚠️
...agentchat/contrib/capabilities/context_handling.py 0.00% 1 Missing ⚠️
...gen/agentchat/contrib/capabilities/teachability.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1711       +/-   ##
===========================================
+ Coverage   39.62%   50.74%   +11.12%     
===========================================
  Files          57       57               
  Lines        6006     6020       +14     
  Branches     1338     1464      +126     
===========================================
+ Hits         2380     3055      +675     
+ Misses       3433     2718      -715     
- Partials      193      247       +54     
Flag Coverage Δ
unittests 50.66% <33.33%> (+11.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@rickyloynd-microsoft rickyloynd-microsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ekzhu
Copy link
Collaborator

ekzhu commented Feb 17, 2024

Before proceeding to merge I just want to understand the cause of error a bit more. See my comment: #1706 (comment)

Copy link
Collaborator

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can take this opportunity to rename the hookable methods:

  1. process_last_message --> process_last_incoming_message
  2. process_all_messages --> process_all_incoming_messages

@ekzhu
Copy link
Collaborator

ekzhu commented Feb 17, 2024

Before proceeding to merge I just want to understand the cause of error a bit more. See my comment: #1706 (comment)

For reference, the explanation is discussed in #1706

@rickyloynd-microsoft
Copy link
Contributor

Perhaps we can take this opportunity to rename the hookable methods:

  1. process_last_message --> process_last_incoming_message
  2. process_all_messages --> process_all_incoming_messages

process_last_incoming_message seems to imply that the last message in the history could be outgoing in some cases. Are there such cases? If not, to avoid this implication and to keep the method name short, we could add a clarification in this method's doc string saying that the last message will always be incoming.

Unless I'm missing something, process_all_incoming_messages is inaccurate because both incoming and outgoing messages are embraced by this method.

@sonichi
Copy link
Contributor Author

sonichi commented Feb 17, 2024

Let's do it in a separate PR. Could you create an issue?

@sonichi sonichi added this pull request to the merge queue Feb 17, 2024
Merged via the queue into main with commit 9708058 Feb 17, 2024
49 of 60 checks passed
@sonichi sonichi deleted the hook_key branch February 17, 2024 18:13
@crimson206
Copy link

I've just checked the error in chess example notebook, and it works fine with the first commit. :) Thanks.

whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* use str for hook key

* bump version to 0.2.15

* remove github

* disable assertion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Notebook, Chess Example. Bug with copied config.
5 participants