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

[Bug]: RetrieveUserProxyAgent ignores customized_prompt #1743

Closed
PyroGenesis opened this issue Feb 21, 2024 · 3 comments
Closed

[Bug]: RetrieveUserProxyAgent ignores customized_prompt #1743

PyroGenesis opened this issue Feb 21, 2024 · 3 comments

Comments

@PyroGenesis
Copy link
Collaborator

PyroGenesis commented Feb 21, 2024

Describe the bug

RetrieveUserProxyAgent is not making use of customized_prompt

Steps to reproduce

  1. Create a RetrieveUserProxyAgent with a customized_prompt in its retrieve_config
  2. Start a chat using a_initiate_chat() with an AssistantAgent

Expected Behavior

The AssistantAgent should receive the customized prompt but it doesn't.

Screenshots and logs

No response

Additional Information

AutoGen: v0.2.14
OS: Windows 10
Python: 3.10.11

We narrowed it down to a_initiate_chat() calling a_generate_init_message() which is not implemented for RetrieveUserProxyAgent so it ends up falling back to ConversableAgent.a_generate_init_message() which does not make use of customized_prompt

@PyroGenesis PyroGenesis changed the title [Bug]: Issue with a_initiate_chat() in RetrieveUserProxyAgent [Bug]: RetrieveUserProxyAgent ignores customized_prompt Feb 21, 2024
@gagb
Copy link
Collaborator

gagb commented Feb 21, 2024

@thinkall

@thinkall
Copy link
Collaborator

Hi @PyroGenesis , I see you've found the root cause. RetrieveUserProxyAgent doesn't support async calls yet. It's on our roadmap. #1657

@PyroGenesis
Copy link
Collaborator Author

Since the introduction of callable messages, this issue can be resolved by using the message_generator callable provided within RetrieveUserProxyAgent

await retrieve_user_proxy_agent.a_initiate_chat(
    general_assistant, 
    message=retrieve_user_proxy_agent.message_generator, 
    problem=problem, 
    n_results=10
)

This still falls back to ConversableAgent.a_generate_init_message() but that's fine because that triggers message_generator as a Callable which returns a message with the customized_prompt and the vector db context.

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

No branches or pull requests

3 participants