h2oai / h2ogpt

Private chat with local GPT with document, images, video, etc. 100% private, Apache 2.0. Supports oLLaMa, Mixtral, llama.cpp, and more. Demo: https://gpt.h2o.ai/ https://gpt-docs.h2o.ai/
http://h2o.ai
Apache License 2.0
11.24k stars 1.23k forks source link

BUG: Broken agent flow #1842

Closed fatihozturkh2o closed 4 days ago

fatihozturkh2o commented 4 days ago

For agents, running into the following error now:


Traceback (most recent call last):
  File "/home/fatih/h2ogpt/openai_server/autogen_streaming.py", line 50, in run_autogen_in_proc
    ret_dict = func(**kwargs)
  File "/home/fatih/h2ogpt/openai_server/agent_utils.py", line 113, in run_agent
    ret_dict = run_agent_func(**kwargs)
  File "/home/fatih/h2ogpt/openai_server/autogen_2agent_backend.py", line 145, in run_autogen_2agent
    chat_result = code_executor_agent.initiate_chat(**chat_kwargs)
  File "/home/fatih/anaconda3/envs/h2ogpt/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 1095, in initiate_chat
    self.send(msg2send, recipient, request_reply=True, silent=silent)
  File "/home/fatih/anaconda3/envs/h2ogpt/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 733, in send
    message = self._process_message_before_send(message, recipient, ConversableAgent._is_silent(self, silent))
  File "/home/fatih/anaconda3/envs/h2ogpt/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 278, in _is_silent
    return agent.silent if agent.silent is not None else silent
AttributeError: 'H2OConversableAgent' object has no attribute 'silent'

seems related to this commit: https://github.com/h2oai/h2ogpt/commit/e3114a1ccc6b60d8b1e60c16855abedabfa2c533

Repro: prompt = any prompt agent_type = auto

pseudotensor commented 4 days ago

Must be due to version differences. My version of ConversableAgent has no silent parameter.

a9b97158d1d5f3a8fbb47246e28327e7609bc903

fatihozturkh2o commented 4 days ago

That explains, I have 0.2.35 (because of > 2.33.0) . Let me also downgrade to that then.