thefazzer / autogen-llama3.2

Creative Commons Attribution 4.0 International
0 stars 0 forks source link

Sweep: Orchestrator (error): Failed to parse ledger information #1

Open thefazzer opened 6 days ago

thefazzer commented 6 days ago

Fix the following runtime error:

--------------------------------------------------------------------------- 
[2024-11-20T15:20:17.295073], Orchestrator (error):

Failed to parse ledger information: {
    "is_request_satisfied": {"reason": "No recipe for big fluffy pancakes has been found yet", "answer": false},
    "is_in_loop": {"reason": "Previous attempts to click on links did not result in a page with the desired content", "answer": true},
    "is_progress_being_made": {"reason": "Recent code execution was able to identify potential next steps", "answer": true},
    "next_speaker": {"reason": "The next step is to attempt to click on another link and see if it leads to the desired content", "answer": "WebSurfer"},
    "instruction_or_question": {"reason": "Please try clicking on a different link in the search results", "answer": "Click on 'Best Fluffy Pancakes Recipe'"}
Error processing publish message
Traceback (most recent call last):
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-core/src/autogen_core/application/_single_threaded_agent_runtime.py", line 385, in _process_publish
    await asyncio.gather(*responses)
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-core/src/autogen_core/application/_single_threaded_agent_runtime.py", line 377, in _on_message
    return await agent.on_message(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-core/src/autogen_core/components/_routed_agent.py", line 468, in on_message
    return await h(self, message, ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-core/src/autogen_core/components/_routed_agent.py", line 148, in wrapper
    return_value = await func(self, message, ctx)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-magentic-one/src/autogen_magentic_one/agents/base_agent.py", line 83, in handle_incoming_message
    await future
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-magentic-one/src/autogen_magentic_one/agents/base_agent.py", line 49, in _process
    await self._handle_broadcast(message, ctx)
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-magentic-one/src/autogen_magentic_one/agents/orchestrator.py", line 280, in _handle_broadcast
    await super()._handle_broadcast(message, ctx)
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-magentic-one/src/autogen_magentic_one/agents/base_orchestrator.py", line 76, in _handle_broadcast
    next_agent = await self._select_next_agent(message.content)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-magentic-one/src/autogen_magentic_one/agents/orchestrator.py", line 324, in _select_next_agent
    ledger_dict = await self.update_ledger(cancellation_token)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-magentic-one/src/autogen_magentic_one/agents/orchestrator.py", line 260, in update_ledger
    raise e
  File "/home/faz/development/autogen-llama3.2/python/packages/autogen-magentic-one/src/autogen_magentic_one/agents/orchestrator.py", line 226, in update_ledger
    ledger_dict: Dict[str, Any] = json.loads(ledger_str)
                                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/faz/miniconda3/envs/ai0/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/faz/miniconda3/envs/ai0/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/faz/miniconda3/envs/ai0/lib/python3.11/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 6 column 159 (char 687)
sweep-ai[bot] commented 6 days ago

❌ The ticket to PR workflow is no longer supported. We have moved to a new chat interface in private beta. Please contact us at team@sweep.dev to try it out.

:book: For more information on how to use Sweep, please read our documentation.

Tracking ID: 5157982b09