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

initate chats enhancement #2404

Merged
merged 2 commits into from
Apr 18, 2024
Merged

initate chats enhancement #2404

merged 2 commits into from
Apr 18, 2024

Conversation

ShobhitVishnoi30
Copy link
Collaborator

Why are these changes needed?

initiate_chats method in the ConversableAgent class had a potential issue when handling the "sender" key in the dictionaries present in the chat_queue list. The issue arose when one or more dictionaries in the chat_queue did not have a "sender" key or had a None value associated with the "sender" key.
it would attempt to assign the self object to the "sender" key for every dictionary in the chat_queue, regardless of whether the "sender" key already existed or had a non-None value. This behavior could lead to unintended consequences, such as overwriting existing "sender" values that were intentionally set by the caller.

Chat.py =>

The "carryover_indexes" key in the chat_info dictionary allows you to specify a list of indexes from the finished_chats list, from which to take the summaries for the carryover information. This is useful when you want to selectively carry over information from specific previous chats, rather than including summaries from all the finished chats.

If "carryover_indexes" is not provided or is an empty list, the code will include summaries from all the finished chats in the carryover information, just like before.
If "carryover_indexes" is provided with a list of indexes, the code will iterate through those indexes and append the corresponding summary from the finished_chats list to the "carryover" list.
The code also includes a check to ensure that the provided indexes are valid and within the range of the finished_chats list.
This feature can be helpful when you want to maintain context from specific previous conversations, while avoiding cluttering the carryover information with irrelevant summaries from other chats. It allows for more fine-grained control over the carryover information passed between conversations.

Related issue number

Checks

@ShobhitVishnoi30
Copy link
Collaborator Author

Hi @sonichi I think now the pull request is correct.Can you please add your reviews here?

@sonichi sonichi added this pull request to the merge queue Apr 18, 2024
Merged via the queue into main with commit 8033fc6 Apr 18, 2024
80 of 89 checks passed
@sonichi sonichi deleted the initiate_chats_update branch April 18, 2024 06:28
jayralencar pushed a commit to jayralencar/autogen that referenced this pull request May 28, 2024
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.

2 participants