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

[Feature Request]: initiate_chats ‘s context cannot be displayed in dictionary format in the conversation list #2753

Open
wangruxun opened this issue May 22, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@wangruxun
Copy link

wangruxun commented May 22, 2024

initiate_chats ‘s context cannot be displayed in dictionary format in the conversation list
(1)Question:According to the carryover mechanism in initiate_chats, the context of each session will be passed to the next session, but if one of the sessions is allowed to accurately obtain the last_msg of a certain session, it cannot be obtained accurately.
(2)For example, a function I want to implement.Among them, Context[0] should be able to correspond to the session content in "recipient": b_agent, because this content is passed to the next session as a carryover.
However, how can I get it accurately in an initiate_chats?
chat_results = a_agent.initiate_chats(
[
{
"recipient": b_agent,
"message": receive_from_a_api(),
"max_turns": 1,
"summary_method": "last_msg",
},
{
"recipient": user_agent,
"message": tasks[1], #
"max_turns": 1,
"summary_method": "last_msg",
},
{
"recipient": judgement_agent,
"message": f"b_agent_comment: {Context[0]} \n user_agent_comment: {Context[1]}",
"max_turns": 1,
"summary_method": "last_msg",
},
]
)

Describe the solution you'd like

A dictionary mechanism should be provided for the context in carryover to facilitate the next session to obtain the content in a previous session and perform one-to-one correspondence.

Additional context

截图-20240522

Tasks

No tasks being tracked yet.

Tasks

No tasks being tracked yet.
@wangruxun wangruxun added the enhancement New feature or request label May 22, 2024
@wangruxun
Copy link
Author

@ekzhu Please tell me how exactly should I get this context in an init_chat?

@ekzhu
Copy link
Collaborator

ekzhu commented May 22, 2024

@wangruxun, for deep customization, you can just write multiple initiate_chat calls directly rather than using initiate_chats to chain them in a pre-defined way. You get much more control over the chat flow this way.

@wangruxun
Copy link
Author

 You mean to create multiple init_chat and then get the chat_results[0].summary of the previous init_chat in this way. But I think this way is not good. It stands to reason that an init_chat should be able to complete it. 
 After all, it already has the ability  “carry over”, The content in the carryover should be bound to the chat_id, so that the next chat_id can accurately obtain the context of the former.

@wangruxun
Copy link
Author

I think the current carryover function has this flaw。It is impossible to distinguish the context corresponding to different chat_id. The context and chat_id should be configured in dictionary format for better acquisition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants