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

TypeError: ConversableAgent._append_oai_message() missing 1 required positional argument: 'is_sending' #3

Closed
gaurab-manandhar opened this issue Oct 20, 2024 · 2 comments

Comments

@gaurab-manandhar
Copy link

gaurab-manandhar commented Oct 20, 2024

Hello @yonitjio

Firstly, I would like to thank you for your contribution made in this project. It was verify helpful to understand AI implementation in Odoo 17. However, when I install this model and run the chat bot I am getting following error:

  Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 2208, in __call__
    response = request._serve_db()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1783, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1810, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 2014, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
    response = super()._dispatch(endpoint)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 759, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/mnt/extra-addons/adv_ai_bot/controllers/main.py", line 10, in query
    AdvAiBot.query(thread_id, thread_model, author_id, query)
  File "/mnt/extra-addons/adv_ai_bot/models/mail_bot_advai.py", line 37, in query
    answer = adv_ai_bot.query(thread, author_id, query)
  File "/mnt/extra-addons/adv_ai_bot/models/adv_ai_bot.py", line 295, in query
    self._admin.initiate_chat(self._manager, message=message, silent=True)
  File "/var/lib/odoo/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 1102, in initiate_chat
    self.send(msg2send, recipient, silent=silent)
  File "/var/lib/odoo/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 738, in send
    recipient.receive(message, self, request_reply, silent)
  File "/var/lib/odoo/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 902, in receive
    reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
  File "/var/lib/odoo/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 2056, in generate_reply
    final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
  File "/mnt/extra-addons/adv_ai_bot/models/agents/groupchat.py", line 56, in restore_history
    self._append_oai_message(history, "user", agent) # from chat manager perspective speaker is user
TypeError: ConversableAgent._append_oai_message() missing 1 required positional argument: 'is_sending'

Could you please share me the autogen version you are using and confirm if this is bug or not?

Thanks,

@yonitjio
Copy link
Owner

I believe it was version 0.2.27.
Please see microsoft/autogen#2635.

@gaurab-manandhar
Copy link
Author

I believe it was version 0.2.27.

I checked the release history of package autogen in PYPI repo but did not find any package version with 0.2.27. Could you please share the requirements.txt for this model to be installed successfully?

Please see microsoft/autogen#2635.

Checking the code base, I can see the name is already passed in the code. If not where should I implement this in your shared code?

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

2 participants