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

custom_user_interactions, suggested function call exception (2) #215

Closed
davorinrusevljan opened this issue Sep 13, 2024 · 0 comments · Fixed by #297
Closed

custom_user_interactions, suggested function call exception (2) #215

davorinrusevljan opened this issue Sep 13, 2024 · 0 comments · Fixed by #297
Assignees

Comments

@davorinrusevljan
Copy link
Collaborator

when running custom_user_interactions, exception sometimes occurs in both console, and mesop.

╭─────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────╮
│ /workspaces/fastagency/fastagency/cli/cli.py:125 in run │
│ │
│ 122 │ ] = None, │
│ 123 ) -> None: │
│ 124 │ dev_mode = False │
│ ❱ 125 │ _run_app( │
│ 126 │ │ path=path, │
│ 127 │ │ app=app, │
│ 128 │ │ workflow=workflow, │
│ │
│ ╭───────────────────────────────────────── locals ─────────────────────────────────────────╮ │
│ │ app = None │ │
│ │ dev_mode = False │ │
│ │ initial_message = None │ │
│ │ path = PosixPath('docs/docs_src/user_guide/custom_user_interactions/main.py') │ │
│ │ workflow = None │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/cli/cli.py:53 in _run_app │
│ │
│ 50 │ │ import_string, fa_app = get_import_string(path=path, app_name=app) │
│ 51 │ │ │
│ 52 │ │ with fa_app.create(import_string=import_string): │
│ ❱ 53 │ │ │ fa_app.start( │
│ 54 │ │ │ │ import_string=import_string, │
│ 55 │ │ │ │ name=workflow, │
│ 56 │ │ │ │ initial_message=initial_message, │
│ │
│ ╭───────────────────────────────────────── locals ─────────────────────────────────────────╮ │
│ │ app = None │ │
│ │ dev_mode = False │ │
│ │ fa_app = <fastagency.app.FastAgency object at 0x70342878c5d0> │ │
│ │ import_string = 'docs.docs_src.user_guide.custom_user_interactions.main:app' │ │
│ │ initial_message = None │ │
│ │ path = PosixPath('docs/docs_src/user_guide/custom_user_interactions/main.py') │ │
│ │ workflow = None │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/app.py:44 in start │
│ │
│ 41 │ │ initial_message: Optional[str] = None, │
│ 42 │ ) -> None: │
│ 43 │ │ """Start the FastAgency.""" │
│ ❱ 44 │ │ self.ui.start( │
│ 45 │ │ │ app=self, │
│ 46 │ │ │ import_string=import_string, │
│ 47 │ │ │ name=name, │
│ │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮ │
│ │ import_string = 'docs.docs_src.user_guide.custom_user_interactions.main:app' │ │
│ │ initial_message = None │ │
│ │ name = None │ │
│ │ self = <fastagency.app.FastAgency object at 0x70342878c5d0> │ │
│ ╰────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/ui/console/base.py:53 in start │
│ │
│ 50 │ │ name: Optional[str] = None, │
│ 51 │ │ initial_message: Optional[str] = None, │
│ 52 │ ) -> None: │
│ ❱ 53 │ │ run_workflow(app.wf, self, name, initial_message) │
│ 54 │ │
│ 55 │ @Property
│ 56 │ def level(self) -> int: │
│ │
│ ╭───────────────────────────────────── locals ──────────────────────────────────────╮ │
│ │ app = <fastagency.app.FastAgency object at 0x70342878c5d0> │ │
│ │ import_string = 'docs.docs_src.user_guide.custom_user_interactions.main:app' │ │
│ │ initial_message = None │ │
│ │ name = None │ │
│ │ self = <fastagency.ui.console.base.ConsoleUI object at 0x70342767df90> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/base.py:323 in run_workflow │
│ │
│ 320 │ │ │ │ ) │
│ 321 │ │ │ ) │
│ 322 │ │ │
│ ❱ 323 │ │ result = wf.run( │
│ 324 │ │ │ name=name, │
│ 325 │ │ │ session_id="session_id", │
│ 326 │ │ │ ui=ui.create_subconversation(), │
│ │
│ ╭─────────────────────────────────────────── locals ────────────────────────────────────────────╮ │
│ │ description = 'Student and teacher chat' │ │
│ │ initial_message = 'leonardo' │ │
│ │ name = 'exam_practice' │ │
│ │ ui = <fastagency.ui.console.base.ConsoleUI object at 0x70342767df90> │ │
│ │ wf = <fastagency.runtime.autogen.base.AutoGenWorkflows object at 0x703428794b50> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/runtime/autogen/base.py:268 in run │
│ │
│ 265 │ │ iostream = IOStreamAdapter(ui) │
│ 266 │ │ │
│ 267 │ │ with IOStream.set_default(iostream): │
│ ❱ 268 │ │ │ return workflow(self, ui, initial_message, session_id) │
│ 269 │ │
│ 270 │ @Property
│ 271 │ def names(self) -> list[str]: │
│ │
│ ╭─────────────────────────────────────────── locals ────────────────────────────────────────────╮ │
│ │ description = 'Student and teacher chat' │ │
│ │ initial_message = 'leonardo' │ │
│ │ iostream = <fastagency.runtime.autogen.base.IOStreamAdapter object at 0x703422af9e10> │ │
│ │ name = 'exam_practice' │ │
│ │ self = <fastagency.runtime.autogen.base.AutoGenWorkflows object at 0x703428794b50> │ │
│ │ session_id = 'session_id' │ │
│ │ ui = <fastagency.ui.console.base.ConsoleUI object at 0x7034287a5550> │ │
│ │ workflow = <function exam_learning at 0x703427647880> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/docs/docs_src/user_guide/custom_user_interactions/main.py:125 in exam_learning │
│ │
│ 122 │ │ description="Get the final grade after submitting the answers.", │
│ 123 │ ) │
│ 124 │ │
│ ❱ 125 │ chat_result = teacher_agent.initiate_chat( │
│ 126 │ │ student_agent, │
│ 127 │ │ message=initial_message, │
│ 128 │ │ summary_method="reflection_with_llm", │
│ │
│ ╭───────────────────────────────────────────────── locals ──────────────────────────────────────────────────╮ │
│ │ get_final_grade = <function exam_learning..get_final_grade at 0x70342188bec0> │ │
│ │ initial_message = 'leonardo' │ │
│ │ is_termination_msg = <function exam_learning..is_termination_msg at 0x703422ba2f20> │ │
│ │ retrieve_exam_questions = <function exam_learning..retrieve_exam_questions at 0x70342188bd80> │ │
│ │ session_id = 'session_id' │ │
│ │ student_agent = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ teacher_agent = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0> │ │
│ │ ui = <fastagency.ui.console.base.ConsoleUI object at 0x7034287a5550> │ │
│ │ wf = <fastagency.runtime.autogen.base.AutoGenWorkflows object at 0x703428794b50> │ │
│ │ write_final_answers = <function exam_learning..write_final_answers at 0x70342188be20> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/vscode/.local/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py:1095 in initiate_chat │
│ │
│ 1092 │ │ │ │ │ msg2send = self.generate_reply(messages=self.chat_messages[recipient │
│ 1093 │ │ │ │ if msg2send is None: │
│ 1094 │ │ │ │ │ break │
│ ❱ 1095 │ │ │ │ self.send(msg2send, recipient, request_reply=True, silent=silent) │
│ 1096 │ │ else: │
│ 1097 │ │ │ self._prepare_chat(recipient, clear_history) │
│ 1098 │ │ │ if isinstance(message, Callable): │
│ │
│ ╭────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────╮ │
│ │ _ = 2 │ │
│ │ _chat_info = { │ │
│ │ │ 'self': <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0>, │ │
│ │ │ 'recipient': <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850>, │ │
│ │ │ 'clear_history': True, │ │
│ │ │ 'silent': False, │ │
│ │ │ 'cache': None, │ │
│ │ │ 'max_turns': 10, │ │
│ │ │ 'summary_method': 'reflection_with_llm', │ │
│ │ │ 'summary_args': {}, │ │
│ │ │ 'message': 'leonardo', │ │
│ │ │ 'kwargs': {}, │ │
│ │ │ ... +1 │ │
│ │ } │ │
│ │ agent = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ cache = None │ │
│ │ clear_history = True │ │
│ │ kwargs = {} │ │
│ │ max_turns = 10 │ │
│ │ message = 'leonardo' │ │
│ │ msg2send = 'That sounds like a solid draft! Here are a few additional points and refinements'+1816 │ │
│ │ recipient = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ self = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0> │ │
│ │ silent = False │ │
│ │ summary_args = {} │ │
│ │ summary_method = 'reflection_with_llm' │ │
│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/vscode/.local/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py:738 in send │
│ │
│ 735 │ │ # unless it's "function". │
│ 736 │ │ valid = self._append_oai_message(message, "assistant", recipient, is_sending=Tru │
│ 737 │ │ if valid: │
│ ❱ 738 │ │ │ recipient.receive(message, self, request_reply, silent) │
│ 739 │ │ else: │
│ 740 │ │ │ raise ValueError( │
│ 741 │ │ │ │ "Message can't be converted into a valid ChatCompletion message. Either │
│ │
│ ╭──────────────────────────────────────────────── locals ─────────────────────────────────────────────────╮ │
│ │ message = 'That sounds like a solid draft! Here are a few additional points and refinements'+1816 │ │
│ │ recipient = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ request_reply = True │ │
│ │ self = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0> │ │
│ │ silent = False │ │
│ │ valid = True │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/vscode/.local/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py:904 in receive │
│ │
│ 901 │ │ │ return │
│ 902 │ │ reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender) │
│ 903 │ │ if reply is not None: │
│ ❱ 904 │ │ │ self.send(reply, sender, silent=silent) │
│ 905 │ │
│ 906 │ async def a_receive( │
│ 907 │ │ self, │
│ │
│ ╭────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────╮ │
│ │ message = 'That sounds like a solid draft! Here are a few additional points and refinements'+1816 │ │
│ │ reply = { │ │
│ │ │ 'content': 'I think the enhanced answer you provided is excellent and adds a lot of │ │
│ │ valuable'+1764, │ │
│ │ │ 'refusal': None, │ │
│ │ │ 'role': 'assistant', │ │
│ │ │ 'function_call': None, │ │
│ │ │ 'tool_calls': [ │ │
│ │ │ │ { │ │
│ │ │ │ │ 'id': 'call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ │ │ 'function': { │ │
│ │ │ │ │ │ 'arguments': '{"message":"The \"Mona Lisa,\" also known as \"La Gioconda,\" is │ │
│ │ a world-renowne'+1567, │ │
│ │ │ │ │ │ 'name': 'write_final_answers' │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ 'type': 'function' │ │
│ │ │ │ } │ │
│ │ │ ] │ │
│ │ } │ │
│ │ request_reply = True │ │
│ │ self = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ sender = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0> │ │
│ │ silent = False │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/vscode/.local/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py:738 in send │
│ │
│ 735 │ │ # unless it's "function". │
│ 736 │ │ valid = self._append_oai_message(message, "assistant", recipient, is_sending=Tru │
│ 737 │ │ if valid: │
│ ❱ 738 │ │ │ recipient.receive(message, self, request_reply, silent) │
│ 739 │ │ else: │
│ 740 │ │ │ raise ValueError( │
│ 741 │ │ │ │ "Message can't be converted into a valid ChatCompletion message. Either │
│ │
│ ╭────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────╮ │
│ │ message = { │ │
│ │ │ 'content': 'I think the enhanced answer you provided is excellent and adds a lot of │ │
│ │ valuable'+1764, │ │
│ │ │ 'refusal': None, │ │
│ │ │ 'role': 'assistant', │ │
│ │ │ 'function_call': None, │ │
│ │ │ 'tool_calls': [ │ │
│ │ │ │ { │ │
│ │ │ │ │ 'id': 'call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ │ │ 'function': { │ │
│ │ │ │ │ │ 'arguments': '{"message":"The \"Mona Lisa,\" also known as \"La Gioconda,\" is │ │
│ │ a world-renowne'+1567, │ │
│ │ │ │ │ │ 'name': 'write_final_answers' │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ 'type': 'function' │ │
│ │ │ │ } │ │
│ │ │ ] │ │
│ │ } │ │
│ │ recipient = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0> │ │
│ │ request_reply = None │ │
│ │ self = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ silent = False │ │
│ │ valid = True │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/vscode/.local/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py:899 in receive │
│ │
│ 896 │ │ Raises: │
│ 897 │ │ │ ValueError: if the message can't be converted into a valid ChatCompletion me │
│ 898 │ │ """ │
│ ❱ 899 │ │ self._process_received_message(message, sender, silent) │
│ 900 │ │ if request_reply is False or request_reply is None and self.reply_at_receive[sen │
│ 901 │ │ │ return │
│ 902 │ │ reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender) │
│ │
│ ╭────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────╮ │
│ │ message = { │ │
│ │ │ 'content': 'I think the enhanced answer you provided is excellent and adds a lot of │ │
│ │ valuable'+1764, │ │
│ │ │ 'refusal': None, │ │
│ │ │ 'role': 'assistant', │ │
│ │ │ 'function_call': None, │ │
│ │ │ 'tool_calls': [ │ │
│ │ │ │ { │ │
│ │ │ │ │ 'id': 'call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ │ │ 'function': { │ │
│ │ │ │ │ │ 'arguments': '{"message":"The \"Mona Lisa,\" also known as \"La Gioconda,\" is │ │
│ │ a world-renowne'+1567, │ │
│ │ │ │ │ │ 'name': 'write_final_answers' │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ 'type': 'function' │ │
│ │ │ │ } │ │
│ │ │ ] │ │
│ │ } │ │
│ │ request_reply = None │ │
│ │ self = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0> │ │
│ │ sender = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ silent = False │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/vscode/.local/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py:867 in │
│ _process_received_message │
│ │
│ 864 │ │ │ ) │
│ 865 │ │ │
│ 866 │ │ if not ConversableAgent._is_silent(sender, silent): │
│ ❱ 867 │ │ │ self._print_received_message(message, sender) │
│ 868 │ │
│ 869 │ def receive( │
│ 870 │ │ self, │
│ │
│ ╭────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────╮ │
│ │ message = { │ │
│ │ │ 'content': 'I think the enhanced answer you provided is excellent and adds a lot of valuable'+1764, │ │
│ │ │ 'refusal': None, │ │
│ │ │ 'role': 'assistant', │ │
│ │ │ 'function_call': None, │ │
│ │ │ 'tool_calls': [ │ │
│ │ │ │ { │ │
│ │ │ │ │ 'id': 'call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ │ │ 'function': { │ │
│ │ │ │ │ │ 'arguments': '{"message":"The \"Mona Lisa,\" also known as \"La Gioconda,\" is a │ │
│ │ world-renowne'+1567, │ │
│ │ │ │ │ │ 'name': 'write_final_answers' │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ 'type': 'function' │ │
│ │ │ │ } │ │
│ │ │ ] │ │
│ │ } │ │
│ │ self = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0> │ │
│ │ sender = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ silent = False │ │
│ │ valid = True │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/vscode/.local/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py:853 in _print_received_message │
│ │
│ 850 │ │ │ │ │ ) │
│ 851 │ │ │ │ │ iostream.print(colored("*" * len(func_print), "green"), flush=True) │
│ 852 │ │ │
│ ❱ 853 │ │ iostream.print("\n", "-" * 80, flush=True, sep="") │
│ 854 │ │
│ 855 │ def _process_received_message(self, message: Union[Dict, str], sender: Agent, silent │
│ 856 │ │ # When the agent receives a message, the role of the message is "user". (If 'rol │
│ │
│ ╭────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────╮ │
│ │ content = 'I think the enhanced answer you provided is excellent and adds a lot of valuable'+1764 │ │
│ │ func_print = '***** Suggested tool call (call_c8sSEi5ldFgxWLtRKt9v5a78): write_final_answers *'+4 │ │
│ │ function_call = { │ │
│ │ │ 'arguments': '{"message":"The \"Mona Lisa,\" also known as \"La Gioconda,\" is a │ │
│ │ world-renowne'+1567, │ │
│ │ │ 'name': 'write_final_answers' │ │
│ │ } │ │
│ │ id = 'call_c8sSEi5ldFgxWLtRKt9v5a78' │ │
│ │ iostream = <fastagency.runtime.autogen.base.IOStreamAdapter object at 0x703422af9e10> │ │
│ │ message = { │ │
│ │ │ 'content': 'I think the enhanced answer you provided is excellent and adds a lot of │ │
│ │ valuable'+1764, │ │
│ │ │ 'refusal': None, │ │
│ │ │ 'role': 'assistant', │ │
│ │ │ 'function_call': None, │ │
│ │ │ 'tool_calls': [ │ │
│ │ │ │ { │ │
│ │ │ │ │ 'id': 'call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ │ │ 'function': { │ │
│ │ │ │ │ │ 'arguments': '{"message":"The \"Mona Lisa,\" also known as \"La Gioconda,\" is │ │
│ │ a world-renowne'+1567, │ │
│ │ │ │ │ │ 'name': 'write_final_answers' │ │
│ │ │ │ │ }, │ │
│ │ │ │ │ 'type': 'function' │ │
│ │ │ │ } │ │
│ │ │ ] │ │
│ │ } │ │
│ │ self = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x7034277bc2d0> │ │
│ │ sender = <autogen.agentchat.conversable_agent.ConversableAgent object at 0x703422b93850> │ │
│ │ tool_call = { │ │
│ │ │ 'id': 'call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ 'function': { │ │
│ │ │ │ 'arguments': '{"message":"The \"Mona Lisa,\" also known as \"La Gioconda,\" is a │ │
│ │ world-renowne'+1567, │ │
│ │ │ │ 'name': 'write_final_answers' │ │
│ │ │ }, │ │
│ │ │ 'type': 'function' │ │
│ │ } │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/runtime/autogen/base.py:213 in print │
│ │
│ 210 │ ) -> None: │
│ 211 │ │ # logger.info(f"print(): {objects=}, {sep=}, {end=}, {flush=}") │
│ 212 │ │ body = sep.join(map(str, objects)) + end │
│ ❱ 213 │ │ ready_to_send = self._process_message_chunk(body) │
│ 214 │ │ if ready_to_send: │
│ 215 │ │ │ message = self.messages[-1] │
│ 216 │ │ │ self.ui.process_message(message) │
│ │
│ ╭─────────────────────────────────────────────── locals ───────────────────────────────────────────────╮ │
│ │ body = '\n-------------------------------------------------------------------------------'+2 │ │
│ │ end = '\n' │ │
│ │ flush = True │ │
│ │ objects = ('\n', '--------------------------------------------------------------------------------') │ │
│ │ self = <fastagency.runtime.autogen.base.IOStreamAdapter object at 0x703422af9e10> │ │
│ │ sep = '' │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/runtime/autogen/base.py:200 in _process_message_chunk │
│ │
│ 197 │ │
│ 198 │ def _process_message_chunk(self, chunk: str) -> bool: │
│ 199 │ │ if self.current_message.process_chunk(chunk): │
│ ❱ 200 │ │ │ msg = self.current_message.create_message() │
│ 201 │ │ │ self.messages.append(msg) │
│ 202 │ │ │ self.current_message = CurrentMessage() │
│ 203 │
│ │
│ ╭─────────────────────────────────────────── locals ────────────────────────────────────────────╮ │
│ │ chunk = '\n-------------------------------------------------------------------------------'+2 │ │
│ │ self = <fastagency.runtime.autogen.base.IOStreamAdapter object at 0x703422af9e10> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/runtime/autogen/base.py:180 in create_message │
│ │
│ 177 │ def create_message(self) -> IOMessage: │
│ 178 │ │ kwargs = {k: v for k, v in asdict(self).items() if v is not None} │
│ 179 │ │ # logger.info(f"CurrentMessage.create_message(): {kwargs=}") │
│ ❱ 180 │ │ return IOMessage.create(**kwargs) │
│ 181 │
│ 182 │
│ 183 class IOStreamAdapter: # IOStream │
│ │
│ ╭────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────╮ │
│ │ kwargs = { │ │
│ │ │ 'sender': 'Student_Agent', │ │
│ │ │ 'recipient': 'Teacher_Agent', │ │
│ │ │ 'type': 'suggested_function_call', │ │
│ │ │ 'auto_reply': False, │ │
│ │ │ 'body': 'I think the enhanced answer you provided is excellent and adds a lot of valuable'+1765, │ │
│ │ │ 'call_id': 'call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ 'function_name': 'write_final_answers', │ │
│ │ │ 'arguments': { │ │
│ │ │ │ 'message': 'The "Mona Lisa," also known as "La Gioconda," is a world-renowned painting creat'+1534 │ │
│ │ │ } │ │
│ │ } │ │
│ │ self = CurrentMessage( │ │
│ │ │ sender='Student_Agent', │ │
│ │ │ recipient='Teacher_Agent', │ │
│ │ │ type='suggested_function_call', │ │
│ │ │ auto_reply=False, │ │
│ │ │ body='I think the enhanced answer you provided is excellent and adds a lot of valuable'+1765, │ │
│ │ │ call_id='call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ function_name='write_final_answers', │ │
│ │ │ arguments={ │ │
│ │ │ │ 'message': 'The "Mona Lisa," also known as "La Gioconda," is a world-renowned painting creat'+1534 │ │
│ │ │ }, │ │
│ │ │ retval=None │ │
│ │ ) │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /workspaces/fastagency/fastagency/base.py:89 in create │
│ │
│ 86 │ │ content = kwargs.pop("content", {}) │
│ 87 │ │ kwargs.update(content) │
│ 88 │ │ │
│ ❱ 89 │ │ return cls(**kwargs) │
│ 90 │ │
│ 91 │ @staticmethod
│ 92 │ def _get_parameters_names() -> list[str]: │
│ │
│ ╭────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────╮ │
│ │ cls = <class 'fastagency.base.SuggestedFunctionCall'> │ │
│ │ content = {} │ │
│ │ kwargs = { │ │
│ │ │ 'sender': 'Student_Agent', │ │
│ │ │ 'recipient': 'Teacher_Agent', │ │
│ │ │ 'auto_reply': False, │ │
│ │ │ 'body': 'I think the enhanced answer you provided is excellent and adds a lot of valuable'+1765, │ │
│ │ │ 'call_id': 'call_c8sSEi5ldFgxWLtRKt9v5a78', │ │
│ │ │ 'function_name': 'write_final_answers', │ │
│ │ │ 'arguments': { │ │
│ │ │ │ 'message': 'The "Mona Lisa," also known as "La Gioconda," is a world-renowned painting │ │
│ │ creat'+1534 │ │
│ │ │ } │ │
│ │ } │ │
│ │ type = 'suggested_function_call' │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: SuggestedFunctionCall.init() got an unexpected keyword argument 'body'

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 a pull request may close this issue.

3 participants