Spaces:
Runtime error
Runtime error
Commit
ยท
e287f80
1
Parent(s):
57af320
i mean justt for fuck sakes can people document shit
Browse files- __pycache__/graph.cpython-313.pyc +0 -0
- app.log +795 -0
- graph.py +123 -84
__pycache__/graph.cpython-313.pyc
CHANGED
Binary files a/__pycache__/graph.cpython-313.pyc and b/__pycache__/graph.cpython-313.pyc differ
|
|
app.log
CHANGED
@@ -52505,3 +52505,798 @@ For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/er
|
|
52505 |
2025-06-09 11:26:12:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52506 |
2025-06-09 11:26:12:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52507 |
2025-06-09 11:27:14:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52505 |
2025-06-09 11:26:12:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52506 |
2025-06-09 11:26:12:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52507 |
2025-06-09 11:27:14:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52508 |
+
2025-06-09 11:32:05:__main__:INFO: Starting the interface
|
52509 |
+
2025-06-09 11:32:10:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52510 |
+
2025-06-09 11:32:16:__main__:INFO: Prompt: You are a helpful assistant.
|
52511 |
+
2025-06-09 11:32:23:__main__:ERROR: Exception occurred
|
52512 |
+
Traceback (most recent call last):
|
52513 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52514 |
+
async for stream_mode, chunk in graph.astream(
|
52515 |
+
...<56 lines>...
|
52516 |
+
yield output, gr.skip(), gr.skip()
|
52517 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
52518 |
+
raise GraphRecursionError(msg)
|
52519 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
52520 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
52521 |
+
2025-06-09 11:35:37:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52522 |
+
2025-06-09 11:35:38:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52523 |
+
2025-06-09 11:40:48:__main__:INFO: Starting the interface
|
52524 |
+
2025-06-09 11:40:49:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52525 |
+
2025-06-09 11:40:49:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52526 |
+
2025-06-09 11:40:49:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52527 |
+
2025-06-09 11:42:30:__main__:INFO: Starting the interface
|
52528 |
+
2025-06-09 11:42:45:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52529 |
+
2025-06-09 11:43:53:__main__:INFO: Starting the interface
|
52530 |
+
2025-06-09 11:43:58:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52531 |
+
2025-06-09 11:44:09:__main__:INFO: Prompt: You are a helpful assistant.
|
52532 |
+
2025-06-09 11:44:21:__main__:ERROR: Exception occurred
|
52533 |
+
Traceback (most recent call last):
|
52534 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52535 |
+
async for stream_mode, chunk in graph.astream(
|
52536 |
+
...<56 lines>...
|
52537 |
+
yield output, gr.skip(), gr.skip()
|
52538 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
52539 |
+
raise GraphRecursionError(msg)
|
52540 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
52541 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
52542 |
+
2025-06-09 11:48:12:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52543 |
+
2025-06-09 11:48:12:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52544 |
+
2025-06-09 11:48:44:__main__:INFO: Starting the interface
|
52545 |
+
2025-06-09 11:49:20:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52546 |
+
2025-06-09 11:49:42:__main__:INFO: Prompt: You are a helpful assistant.
|
52547 |
+
2025-06-09 11:49:43:__main__:ERROR: Exception occurred
|
52548 |
+
Traceback (most recent call last):
|
52549 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52550 |
+
async for stream_mode, chunk in graph.astream(
|
52551 |
+
...<56 lines>...
|
52552 |
+
yield output, gr.skip(), gr.skip()
|
52553 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2655, in astream
|
52554 |
+
async for _ in runner.atick(
|
52555 |
+
...<7 lines>...
|
52556 |
+
yield o
|
52557 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 400, in atick
|
52558 |
+
_panic_or_proceed(
|
52559 |
+
~~~~~~~~~~~~~~~~~^
|
52560 |
+
futures.done.union(f for f, t in futures.items() if t is not None),
|
52561 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52562 |
+
timeout_exc_cls=asyncio.TimeoutError,
|
52563 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52564 |
+
panic=reraise,
|
52565 |
+
^^^^^^^^^^^^^^
|
52566 |
+
)
|
52567 |
+
^
|
52568 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 509, in _panic_or_proceed
|
52569 |
+
raise exc
|
52570 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\retry.py", line 136, in arun_with_retry
|
52571 |
+
return await task.proc.ainvoke(task.input, config)
|
52572 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52573 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 678, in ainvoke
|
52574 |
+
input = await step.ainvoke(input, config)
|
52575 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52576 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 440, in ainvoke
|
52577 |
+
ret = await self.afunc(*args, **kwargs)
|
52578 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52579 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\branch.py", line 185, in _aroute
|
52580 |
+
value = reader(config)
|
52581 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\read.py", line 110, in do_read
|
52582 |
+
return mapper(read(select, fresh))
|
52583 |
+
~~~~^^^^^^^^^^^^^^^
|
52584 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 201, in local_read
|
52585 |
+
cc.update(updated[k])
|
52586 |
+
~~~~~~~~~^^^^^^^^^^^^
|
52587 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\binop.py", line 91, in update
|
52588 |
+
self.value = self.operator(self.value, value)
|
52589 |
+
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
|
52590 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 39, in _add_messages
|
52591 |
+
return func(left, right, **kwargs)
|
52592 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 182, in add_messages
|
52593 |
+
for m in convert_to_messages(right)
|
52594 |
+
~~~~~~~~~~~~~~~~~~~^^^^^^^
|
52595 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 367, in convert_to_messages
|
52596 |
+
return [_convert_to_message(m) for m in messages]
|
52597 |
+
~~~~~~~~~~~~~~~~~~~^^^
|
52598 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 346, in _convert_to_message
|
52599 |
+
raise NotImplementedError(msg)
|
52600 |
+
NotImplementedError: Unsupported message type: <class 'mistralai.models.chatcompletionresponse.ChatCompletionResponse'>
|
52601 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE
|
52602 |
+
During task with name 'brainstorming_node' and id '81cb59aa-9287-0232-c2f6-69184aa8c408'
|
52603 |
+
2025-06-09 11:59:18:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52604 |
+
2025-06-09 11:59:18:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52605 |
+
2025-06-09 12:06:23:__main__:INFO: Starting the interface
|
52606 |
+
2025-06-09 12:06:24:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52607 |
+
2025-06-09 12:06:28:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52608 |
+
2025-06-09 12:06:28:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52609 |
+
2025-06-09 12:08:48:__main__:INFO: Starting the interface
|
52610 |
+
2025-06-09 12:08:52:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52611 |
+
2025-06-09 12:08:58:__main__:INFO: Prompt: You are a helpful assistant.
|
52612 |
+
2025-06-09 12:09:08:__main__:ERROR: Exception occurred
|
52613 |
+
Traceback (most recent call last):
|
52614 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52615 |
+
async for stream_mode, chunk in graph.astream(
|
52616 |
+
...<56 lines>...
|
52617 |
+
yield output, gr.skip(), gr.skip()
|
52618 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
52619 |
+
raise GraphRecursionError(msg)
|
52620 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
52621 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
52622 |
+
2025-06-09 12:19:30:__main__:INFO: Starting the interface
|
52623 |
+
2025-06-09 12:19:34:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52624 |
+
2025-06-09 12:19:40:__main__:INFO: Prompt: You are a helpful assistant.
|
52625 |
+
2025-06-09 12:19:43:__main__:ERROR: Exception occurred
|
52626 |
+
Traceback (most recent call last):
|
52627 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52628 |
+
async for stream_mode, chunk in graph.astream(
|
52629 |
+
...<56 lines>...
|
52630 |
+
yield output, gr.skip(), gr.skip()
|
52631 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2655, in astream
|
52632 |
+
async for _ in runner.atick(
|
52633 |
+
...<7 lines>...
|
52634 |
+
yield o
|
52635 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 400, in atick
|
52636 |
+
_panic_or_proceed(
|
52637 |
+
~~~~~~~~~~~~~~~~~^
|
52638 |
+
futures.done.union(f for f, t in futures.items() if t is not None),
|
52639 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52640 |
+
timeout_exc_cls=asyncio.TimeoutError,
|
52641 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52642 |
+
panic=reraise,
|
52643 |
+
^^^^^^^^^^^^^^
|
52644 |
+
)
|
52645 |
+
^
|
52646 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 509, in _panic_or_proceed
|
52647 |
+
raise exc
|
52648 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\retry.py", line 136, in arun_with_retry
|
52649 |
+
return await task.proc.ainvoke(task.input, config)
|
52650 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52651 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 678, in ainvoke
|
52652 |
+
input = await step.ainvoke(input, config)
|
52653 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52654 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 440, in ainvoke
|
52655 |
+
ret = await self.afunc(*args, **kwargs)
|
52656 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52657 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\branch.py", line 185, in _aroute
|
52658 |
+
value = reader(config)
|
52659 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\read.py", line 110, in do_read
|
52660 |
+
return mapper(read(select, fresh))
|
52661 |
+
~~~~^^^^^^^^^^^^^^^
|
52662 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 201, in local_read
|
52663 |
+
cc.update(updated[k])
|
52664 |
+
~~~~~~~~~^^^^^^^^^^^^
|
52665 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\binop.py", line 91, in update
|
52666 |
+
self.value = self.operator(self.value, value)
|
52667 |
+
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
|
52668 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 39, in _add_messages
|
52669 |
+
return func(left, right, **kwargs)
|
52670 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 182, in add_messages
|
52671 |
+
for m in convert_to_messages(right)
|
52672 |
+
~~~~~~~~~~~~~~~~~~~^^^^^^^
|
52673 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 367, in convert_to_messages
|
52674 |
+
return [_convert_to_message(m) for m in messages]
|
52675 |
+
~~~~~~~~~~~~~~~~~~~^^^
|
52676 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 346, in _convert_to_message
|
52677 |
+
raise NotImplementedError(msg)
|
52678 |
+
NotImplementedError: Unsupported message type: <class 'mistralai.models.assistantmessage.AssistantMessage'>
|
52679 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE
|
52680 |
+
During task with name 'brainstorming_node' and id '809b3f0c-e87a-2b7b-b397-ddaf22756c7d'
|
52681 |
+
2025-06-09 12:20:46:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52682 |
+
2025-06-09 12:20:46:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52683 |
+
2025-06-09 12:21:00:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52684 |
+
2025-06-09 12:21:00:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52685 |
+
2025-06-09 12:21:15:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52686 |
+
2025-06-09 12:21:15:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52687 |
+
2025-06-09 12:21:15:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52688 |
+
2025-06-09 12:21:23:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52689 |
+
2025-06-09 12:21:43:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52690 |
+
2025-06-09 12:21:43:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52691 |
+
2025-06-09 12:22:07:__main__:INFO: Starting the interface
|
52692 |
+
2025-06-09 12:22:10:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52693 |
+
2025-06-09 12:22:19:__main__:INFO: Prompt: You are a helpful assistant.
|
52694 |
+
2025-06-09 12:22:27:__main__:ERROR: Exception occurred
|
52695 |
+
Traceback (most recent call last):
|
52696 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52697 |
+
async for stream_mode, chunk in graph.astream(
|
52698 |
+
...<56 lines>...
|
52699 |
+
yield output, gr.skip(), gr.skip()
|
52700 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2655, in astream
|
52701 |
+
async for _ in runner.atick(
|
52702 |
+
...<7 lines>...
|
52703 |
+
yield o
|
52704 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 400, in atick
|
52705 |
+
_panic_or_proceed(
|
52706 |
+
~~~~~~~~~~~~~~~~~^
|
52707 |
+
futures.done.union(f for f, t in futures.items() if t is not None),
|
52708 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52709 |
+
timeout_exc_cls=asyncio.TimeoutError,
|
52710 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52711 |
+
panic=reraise,
|
52712 |
+
^^^^^^^^^^^^^^
|
52713 |
+
)
|
52714 |
+
^
|
52715 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 509, in _panic_or_proceed
|
52716 |
+
raise exc
|
52717 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\retry.py", line 136, in arun_with_retry
|
52718 |
+
return await task.proc.ainvoke(task.input, config)
|
52719 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52720 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 678, in ainvoke
|
52721 |
+
input = await step.ainvoke(input, config)
|
52722 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52723 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 440, in ainvoke
|
52724 |
+
ret = await self.afunc(*args, **kwargs)
|
52725 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52726 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\branch.py", line 185, in _aroute
|
52727 |
+
value = reader(config)
|
52728 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\read.py", line 110, in do_read
|
52729 |
+
return mapper(read(select, fresh))
|
52730 |
+
~~~~^^^^^^^^^^^^^^^
|
52731 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 201, in local_read
|
52732 |
+
cc.update(updated[k])
|
52733 |
+
~~~~~~~~~^^^^^^^^^^^^
|
52734 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\binop.py", line 91, in update
|
52735 |
+
self.value = self.operator(self.value, value)
|
52736 |
+
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
|
52737 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 39, in _add_messages
|
52738 |
+
return func(left, right, **kwargs)
|
52739 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 182, in add_messages
|
52740 |
+
for m in convert_to_messages(right)
|
52741 |
+
~~~~~~~~~~~~~~~~~~~^^^^^^^
|
52742 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 367, in convert_to_messages
|
52743 |
+
return [_convert_to_message(m) for m in messages]
|
52744 |
+
~~~~~~~~~~~~~~~~~~~^^^
|
52745 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 346, in _convert_to_message
|
52746 |
+
raise NotImplementedError(msg)
|
52747 |
+
NotImplementedError: Unsupported message type: <class 'mistralai.models.chatcompletionresponse.ChatCompletionResponse'>
|
52748 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE
|
52749 |
+
During task with name 'brainstorming_node' and id '0600dd30-c1d1-4349-04d7-dee9ca36b41d'
|
52750 |
+
2025-06-09 12:27:44:__main__:INFO: Starting the interface
|
52751 |
+
2025-06-09 12:28:16:__main__:INFO: Starting the interface
|
52752 |
+
2025-06-09 12:28:19:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52753 |
+
2025-06-09 12:28:34:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52754 |
+
2025-06-09 12:28:44:__main__:INFO: Prompt: You are a helpful assistant.
|
52755 |
+
2025-06-09 12:28:47:__main__:ERROR: Exception occurred
|
52756 |
+
Traceback (most recent call last):
|
52757 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 329, in _convert_to_message
|
52758 |
+
msg_type = msg_kwargs.pop("role")
|
52759 |
+
KeyError: 'role'
|
52760 |
+
|
52761 |
+
During handling of the above exception, another exception occurred:
|
52762 |
+
|
52763 |
+
Traceback (most recent call last):
|
52764 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 331, in _convert_to_message
|
52765 |
+
msg_type = msg_kwargs.pop("type")
|
52766 |
+
KeyError: 'type'
|
52767 |
+
|
52768 |
+
The above exception was the direct cause of the following exception:
|
52769 |
+
|
52770 |
+
Traceback (most recent call last):
|
52771 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52772 |
+
async for stream_mode, chunk in graph.astream(
|
52773 |
+
...<56 lines>...
|
52774 |
+
yield output, gr.skip(), gr.skip()
|
52775 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2655, in astream
|
52776 |
+
async for _ in runner.atick(
|
52777 |
+
...<7 lines>...
|
52778 |
+
yield o
|
52779 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 400, in atick
|
52780 |
+
_panic_or_proceed(
|
52781 |
+
~~~~~~~~~~~~~~~~~^
|
52782 |
+
futures.done.union(f for f, t in futures.items() if t is not None),
|
52783 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52784 |
+
timeout_exc_cls=asyncio.TimeoutError,
|
52785 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52786 |
+
panic=reraise,
|
52787 |
+
^^^^^^^^^^^^^^
|
52788 |
+
)
|
52789 |
+
^
|
52790 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 509, in _panic_or_proceed
|
52791 |
+
raise exc
|
52792 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\retry.py", line 136, in arun_with_retry
|
52793 |
+
return await task.proc.ainvoke(task.input, config)
|
52794 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52795 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 678, in ainvoke
|
52796 |
+
input = await step.ainvoke(input, config)
|
52797 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52798 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 440, in ainvoke
|
52799 |
+
ret = await self.afunc(*args, **kwargs)
|
52800 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52801 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\branch.py", line 185, in _aroute
|
52802 |
+
value = reader(config)
|
52803 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\read.py", line 110, in do_read
|
52804 |
+
return mapper(read(select, fresh))
|
52805 |
+
~~~~^^^^^^^^^^^^^^^
|
52806 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 201, in local_read
|
52807 |
+
cc.update(updated[k])
|
52808 |
+
~~~~~~~~~^^^^^^^^^^^^
|
52809 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\binop.py", line 91, in update
|
52810 |
+
self.value = self.operator(self.value, value)
|
52811 |
+
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
|
52812 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 39, in _add_messages
|
52813 |
+
return func(left, right, **kwargs)
|
52814 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 182, in add_messages
|
52815 |
+
for m in convert_to_messages(right)
|
52816 |
+
~~~~~~~~~~~~~~~~~~~^^^^^^^
|
52817 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 367, in convert_to_messages
|
52818 |
+
return [_convert_to_message(m) for m in messages]
|
52819 |
+
~~~~~~~~~~~~~~~~~~~^^^
|
52820 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 339, in _convert_to_message
|
52821 |
+
raise ValueError(msg) from e
|
52822 |
+
ValueError: Message dict must contain 'role' and 'content' keys, got {'messages': [AssistantMessage(content='', tool_calls=[ToolCall(function=FunctionCall(name='human_assistance', arguments='{"query": "Do you have any specific interests or types of DIY projects you\'ve enjoyed in the past?"}'), id='w69t9L3oK', type=None, index=0)], prefix=False, role='assistant')], 'tool_calls': [{'name': 'human_assistance', 'arguments': {'query': "Do you have any specific interests or types of DIY projects you've enjoyed in the past?"}}], 'next': 'human_assistance'}
|
52823 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE
|
52824 |
+
During task with name 'brainstorming_node' and id 'cd8f18b4-5162-ad1d-30ac-4067d96e1922'
|
52825 |
+
2025-06-09 12:35:40:__main__:INFO: Starting the interface
|
52826 |
+
2025-06-09 12:35:44:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52827 |
+
2025-06-09 12:35:49:__main__:INFO: Prompt: You are a helpful assistant.
|
52828 |
+
2025-06-09 12:36:00:__main__:ERROR: Exception occurred
|
52829 |
+
Traceback (most recent call last):
|
52830 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52831 |
+
async for stream_mode, chunk in graph.astream(
|
52832 |
+
...<56 lines>...
|
52833 |
+
yield output, gr.skip(), gr.skip()
|
52834 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
52835 |
+
raise GraphRecursionError(msg)
|
52836 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
52837 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
52838 |
+
2025-06-09 12:37:42:__main__:INFO: Starting the interface
|
52839 |
+
2025-06-09 12:37:45:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52840 |
+
2025-06-09 12:37:51:__main__:INFO: Prompt: You are a helpful assistant.
|
52841 |
+
2025-06-09 12:37:53:__main__:ERROR: Exception occurred
|
52842 |
+
Traceback (most recent call last):
|
52843 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 329, in _convert_to_message
|
52844 |
+
msg_type = msg_kwargs.pop("role")
|
52845 |
+
KeyError: 'role'
|
52846 |
+
|
52847 |
+
During handling of the above exception, another exception occurred:
|
52848 |
+
|
52849 |
+
Traceback (most recent call last):
|
52850 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 331, in _convert_to_message
|
52851 |
+
msg_type = msg_kwargs.pop("type")
|
52852 |
+
KeyError: 'type'
|
52853 |
+
|
52854 |
+
The above exception was the direct cause of the following exception:
|
52855 |
+
|
52856 |
+
Traceback (most recent call last):
|
52857 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52858 |
+
async for stream_mode, chunk in graph.astream(
|
52859 |
+
...<56 lines>...
|
52860 |
+
yield output, gr.skip(), gr.skip()
|
52861 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2655, in astream
|
52862 |
+
async for _ in runner.atick(
|
52863 |
+
...<7 lines>...
|
52864 |
+
yield o
|
52865 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 400, in atick
|
52866 |
+
_panic_or_proceed(
|
52867 |
+
~~~~~~~~~~~~~~~~~^
|
52868 |
+
futures.done.union(f for f, t in futures.items() if t is not None),
|
52869 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52870 |
+
timeout_exc_cls=asyncio.TimeoutError,
|
52871 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52872 |
+
panic=reraise,
|
52873 |
+
^^^^^^^^^^^^^^
|
52874 |
+
)
|
52875 |
+
^
|
52876 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\runner.py", line 509, in _panic_or_proceed
|
52877 |
+
raise exc
|
52878 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\retry.py", line 136, in arun_with_retry
|
52879 |
+
return await task.proc.ainvoke(task.input, config)
|
52880 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52881 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 678, in ainvoke
|
52882 |
+
input = await step.ainvoke(input, config)
|
52883 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52884 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\utils\runnable.py", line 440, in ainvoke
|
52885 |
+
ret = await self.afunc(*args, **kwargs)
|
52886 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52887 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\branch.py", line 185, in _aroute
|
52888 |
+
value = reader(config)
|
52889 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\read.py", line 110, in do_read
|
52890 |
+
return mapper(read(select, fresh))
|
52891 |
+
~~~~^^^^^^^^^^^^^^^
|
52892 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 201, in local_read
|
52893 |
+
cc.update(updated[k])
|
52894 |
+
~~~~~~~~~^^^^^^^^^^^^
|
52895 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\binop.py", line 91, in update
|
52896 |
+
self.value = self.operator(self.value, value)
|
52897 |
+
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
|
52898 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 39, in _add_messages
|
52899 |
+
return func(left, right, **kwargs)
|
52900 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\graph\message.py", line 182, in add_messages
|
52901 |
+
for m in convert_to_messages(right)
|
52902 |
+
~~~~~~~~~~~~~~~~~~~^^^^^^^
|
52903 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 367, in convert_to_messages
|
52904 |
+
return [_convert_to_message(m) for m in messages]
|
52905 |
+
~~~~~~~~~~~~~~~~~~~^^^
|
52906 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langchain_core\messages\utils.py", line 339, in _convert_to_message
|
52907 |
+
raise ValueError(msg) from e
|
52908 |
+
ValueError: Message dict must contain 'role' and 'content' keys, got {'messages': [AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'zKdQNaTAM', 'function': {'name': 'human_assistance', 'arguments': '{"query": "Hello! How can I assist you today with your DIY project ideas?"}'}, 'type': 'function'}]}, response_metadata={}, tool_calls=[{'name': 'human_assistance', 'args': {'query': 'Hello! How can I assist you today with your DIY project ideas?'}, 'id': 'zKdQNaTAM', 'type': 'tool_call'}])], 'tool_calls': [{'name': 'human_assistance', 'arguments': {'query': 'Hello! How can I assist you today with your DIY project ideas?'}}], 'next': 'human_assistance'}
|
52909 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE
|
52910 |
+
During task with name 'brainstorming_node' and id 'f14ef845-debd-b500-5442-fdb5e59be1c9'
|
52911 |
+
2025-06-09 12:40:27:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52912 |
+
2025-06-09 12:40:27:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52913 |
+
2025-06-09 12:40:55:__main__:INFO: Starting the interface
|
52914 |
+
2025-06-09 12:41:05:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52915 |
+
2025-06-09 12:41:10:__main__:INFO: Prompt: You are a helpful assistant.
|
52916 |
+
2025-06-09 12:41:18:__main__:INFO: Prompt: You are a helpful assistant.
|
52917 |
+
2025-06-09 12:41:37:__main__:INFO: Prompt: You are a helpful assistant.
|
52918 |
+
2025-06-09 12:41:48:__main__:INFO: Prompt: You are a helpful assistant.
|
52919 |
+
2025-06-09 12:42:00:__main__:INFO: Prompt: You are a helpful assistant.
|
52920 |
+
2025-06-09 12:42:15:__main__:INFO: Prompt: You are a helpful assistant.
|
52921 |
+
2025-06-09 12:42:25:__main__:INFO: Prompt: You are a helpful assistant.
|
52922 |
+
2025-06-09 12:47:49:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52923 |
+
2025-06-09 12:47:49:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52924 |
+
2025-06-09 12:48:27:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52925 |
+
2025-06-09 12:48:27:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52926 |
+
2025-06-09 12:48:46:__main__:INFO: Starting the interface
|
52927 |
+
2025-06-09 12:48:50:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52928 |
+
2025-06-09 12:49:01:__main__:INFO: Prompt: You are a helpful assistant.
|
52929 |
+
2025-06-09 12:49:23:__main__:INFO: Prompt: You are a helpful assistant.
|
52930 |
+
2025-06-09 12:51:51:__main__:INFO: Prompt: You are a helpful assistant.
|
52931 |
+
2025-06-09 12:53:01:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52932 |
+
2025-06-09 12:53:02:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52933 |
+
2025-06-09 12:54:06:__main__:INFO: Starting the interface
|
52934 |
+
2025-06-09 12:54:14:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52935 |
+
2025-06-09 12:54:22:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52936 |
+
2025-06-09 12:54:30:__main__:INFO: Prompt: You are a helpful assistant.
|
52937 |
+
2025-06-09 12:54:39:__main__:ERROR: Exception occurred
|
52938 |
+
Traceback (most recent call last):
|
52939 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52940 |
+
async for stream_mode, chunk in graph.astream(
|
52941 |
+
...<56 lines>...
|
52942 |
+
yield output, gr.skip(), gr.skip()
|
52943 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
52944 |
+
raise GraphRecursionError(msg)
|
52945 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
52946 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
52947 |
+
2025-06-09 12:55:30:__main__:INFO: Starting the interface
|
52948 |
+
2025-06-09 12:55:34:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52949 |
+
2025-06-09 12:55:37:__main__:INFO: Prompt: You are a helpful assistant.
|
52950 |
+
2025-06-09 12:55:49:__main__:INFO: Prompt: You are a helpful assistant.
|
52951 |
+
2025-06-09 12:56:06:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52952 |
+
2025-06-09 12:56:06:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52953 |
+
2025-06-09 12:56:26:__main__:INFO: Starting the interface
|
52954 |
+
2025-06-09 12:56:30:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52955 |
+
2025-06-09 12:56:36:__main__:INFO: Prompt: You are a helpful assistant.
|
52956 |
+
2025-06-09 12:57:52:__main__:INFO: Prompt: You are a helpful assistant.
|
52957 |
+
2025-06-09 13:05:29:__main__:INFO: Starting the interface
|
52958 |
+
2025-06-09 13:05:34:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52959 |
+
2025-06-09 13:05:39:__main__:INFO: Prompt: You are a helpful assistant.
|
52960 |
+
2025-06-09 13:05:56:__main__:INFO: Prompt: You are a helpful assistant.
|
52961 |
+
2025-06-09 13:06:11:__main__:INFO: Prompt: You are a helpful assistant.
|
52962 |
+
2025-06-09 13:11:08:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52963 |
+
2025-06-09 13:11:08:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52964 |
+
2025-06-09 13:12:34:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52965 |
+
2025-06-09 13:12:34:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52966 |
+
2025-06-09 13:13:02:__main__:INFO: Starting the interface
|
52967 |
+
2025-06-09 13:13:05:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52968 |
+
2025-06-09 13:13:11:__main__:INFO: Prompt: You are a helpful assistant.
|
52969 |
+
2025-06-09 13:13:22:__main__:INFO: Prompt: You are a helpful assistant.
|
52970 |
+
2025-06-09 13:13:52:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52971 |
+
2025-06-09 13:13:52:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52972 |
+
2025-06-09 13:14:06:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52973 |
+
2025-06-09 13:14:06:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52974 |
+
2025-06-09 13:15:10:__main__:INFO: Starting the interface
|
52975 |
+
2025-06-09 13:16:01:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52976 |
+
2025-06-09 13:16:05:__main__:INFO: Prompt: You are a helpful assistant.
|
52977 |
+
2025-06-09 13:16:13:__main__:INFO: Prompt: You are a helpful assistant.
|
52978 |
+
2025-06-09 13:16:22:__main__:INFO: Prompt: You are a helpful assistant.
|
52979 |
+
2025-06-09 13:16:32:__main__:INFO: Prompt: You are a helpful assistant.
|
52980 |
+
2025-06-09 13:19:14:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52981 |
+
2025-06-09 13:19:14:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52982 |
+
2025-06-09 13:19:37:__main__:INFO: Starting the interface
|
52983 |
+
2025-06-09 13:19:40:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52984 |
+
2025-06-09 13:19:46:__main__:INFO: Prompt: You are a helpful assistant.
|
52985 |
+
2025-06-09 13:20:03:__main__:INFO: Prompt: You are a helpful assistant.
|
52986 |
+
2025-06-09 13:20:52:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52987 |
+
2025-06-09 13:20:53:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52988 |
+
2025-06-09 13:23:01:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52989 |
+
2025-06-09 13:23:01:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52990 |
+
2025-06-09 13:23:27:__main__:INFO: Starting the interface
|
52991 |
+
2025-06-09 13:23:32:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
52992 |
+
2025-06-09 13:23:38:__main__:INFO: Prompt: You are a helpful assistant.
|
52993 |
+
2025-06-09 13:23:44:__main__:ERROR: Exception occurred
|
52994 |
+
Traceback (most recent call last):
|
52995 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
52996 |
+
async for stream_mode, chunk in graph.astream(
|
52997 |
+
...<57 lines>...
|
52998 |
+
yield output, gr.skip(), gr.skip()
|
52999 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
53000 |
+
raise GraphRecursionError(msg)
|
53001 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
53002 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
53003 |
+
2025-06-09 13:30:14:__main__:INFO: Starting the interface
|
53004 |
+
2025-06-09 13:30:19:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53005 |
+
2025-06-09 13:30:23:__main__:INFO: Prompt: You are a helpful assistant.
|
53006 |
+
2025-06-09 13:30:30:__main__:ERROR: Exception occurred
|
53007 |
+
Traceback (most recent call last):
|
53008 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53009 |
+
async for stream_mode, chunk in graph.astream(
|
53010 |
+
...<57 lines>...
|
53011 |
+
yield output, gr.skip(), gr.skip()
|
53012 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
53013 |
+
raise GraphRecursionError(msg)
|
53014 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
53015 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
53016 |
+
2025-06-09 13:32:45:__main__:INFO: Starting the interface
|
53017 |
+
2025-06-09 13:32:53:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53018 |
+
2025-06-09 13:33:01:__main__:INFO: Prompt: You are a helpful assistant.
|
53019 |
+
2025-06-09 13:33:42:__main__:INFO: Starting the interface
|
53020 |
+
2025-06-09 13:33:45:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53021 |
+
2025-06-09 13:33:54:__main__:INFO: Prompt: You are a helpful assistant.
|
53022 |
+
2025-06-09 13:34:07:__main__:INFO: Prompt: You are a helpful assistant.
|
53023 |
+
2025-06-09 13:36:34:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53024 |
+
2025-06-09 13:36:34:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53025 |
+
2025-06-09 13:37:08:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53026 |
+
2025-06-09 13:37:08:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53027 |
+
2025-06-09 13:37:16:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53028 |
+
2025-06-09 13:37:40:__main__:INFO: Starting the interface
|
53029 |
+
2025-06-09 13:37:44:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53030 |
+
2025-06-09 13:37:48:__main__:INFO: Prompt: You are a helpful assistant.
|
53031 |
+
2025-06-09 13:37:53:__main__:ERROR: Exception occurred
|
53032 |
+
Traceback (most recent call last):
|
53033 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53034 |
+
async for stream_mode, chunk in graph.astream(
|
53035 |
+
...<57 lines>...
|
53036 |
+
yield output, gr.skip(), gr.skip()
|
53037 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
53038 |
+
raise GraphRecursionError(msg)
|
53039 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
53040 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
53041 |
+
2025-06-09 13:39:36:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53042 |
+
2025-06-09 13:39:36:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53043 |
+
2025-06-09 13:39:57:__main__:INFO: Starting the interface
|
53044 |
+
2025-06-09 13:40:03:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53045 |
+
2025-06-09 13:40:10:__main__:INFO: Prompt: You are a helpful assistant.
|
53046 |
+
2025-06-09 13:40:18:__main__:INFO: Prompt: You are a helpful assistant.
|
53047 |
+
2025-06-09 13:41:07:__main__:INFO: Starting the interface
|
53048 |
+
2025-06-09 13:41:11:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53049 |
+
2025-06-09 13:41:18:__main__:INFO: Prompt: You are a helpful assistant.
|
53050 |
+
2025-06-09 13:41:24:__main__:ERROR: Exception occurred
|
53051 |
+
Traceback (most recent call last):
|
53052 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53053 |
+
async for stream_mode, chunk in graph.astream(
|
53054 |
+
...<57 lines>...
|
53055 |
+
yield output, gr.skip(), gr.skip()
|
53056 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
53057 |
+
raise GraphRecursionError(msg)
|
53058 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
53059 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
53060 |
+
2025-06-09 13:41:59:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53061 |
+
2025-06-09 13:41:59:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53062 |
+
2025-06-09 13:42:19:__main__:INFO: Starting the interface
|
53063 |
+
2025-06-09 13:42:22:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53064 |
+
2025-06-09 13:42:29:__main__:INFO: Prompt: You are a helpful assistant.
|
53065 |
+
2025-06-09 13:42:46:__main__:INFO: Prompt: You are a helpful assistant.
|
53066 |
+
2025-06-09 13:43:32:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53067 |
+
2025-06-09 13:43:32:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53068 |
+
2025-06-09 13:44:05:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53069 |
+
2025-06-09 13:44:05:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53070 |
+
2025-06-09 13:44:19:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53071 |
+
2025-06-09 13:44:27:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53072 |
+
2025-06-09 13:44:54:__main__:INFO: Starting the interface
|
53073 |
+
2025-06-09 13:44:57:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53074 |
+
2025-06-09 13:45:00:__main__:INFO: Prompt: You are a helpful assistant.
|
53075 |
+
2025-06-09 13:45:07:__main__:ERROR: Exception occurred
|
53076 |
+
Traceback (most recent call last):
|
53077 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53078 |
+
async for stream_mode, chunk in graph.astream(
|
53079 |
+
...<57 lines>...
|
53080 |
+
yield output, gr.skip(), gr.skip()
|
53081 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
53082 |
+
raise GraphRecursionError(msg)
|
53083 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
53084 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
53085 |
+
2025-06-09 13:47:03:__main__:INFO: Starting the interface
|
53086 |
+
2025-06-09 13:47:33:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53087 |
+
2025-06-09 13:47:37:__main__:INFO: Prompt: You are a helpful assistant.
|
53088 |
+
2025-06-09 13:47:55:__main__:INFO: Prompt: You are a helpful assistant.
|
53089 |
+
2025-06-09 13:48:18:__main__:INFO: Prompt: You are a helpful assistant.
|
53090 |
+
2025-06-09 13:52:59:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53091 |
+
2025-06-09 13:52:59:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53092 |
+
2025-06-09 13:53:26:__main__:INFO: Starting the interface
|
53093 |
+
2025-06-09 13:53:31:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53094 |
+
2025-06-09 13:53:45:__main__:INFO: Prompt: You are a helpful assistant.
|
53095 |
+
2025-06-09 13:53:53:__main__:INFO: Prompt: You are a helpful assistant.
|
53096 |
+
2025-06-09 13:53:55:__main__:ERROR: Exception occurred
|
53097 |
+
Traceback (most recent call last):
|
53098 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53099 |
+
async for stream_mode, chunk in graph.astream(
|
53100 |
+
...<57 lines>...
|
53101 |
+
yield output, gr.skip(), gr.skip()
|
53102 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2652, in astream
|
53103 |
+
while loop.tick(input_keys=self.input_channels):
|
53104 |
+
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
53105 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\loop.py", line 493, in tick
|
53106 |
+
mv_writes, updated_channels = apply_writes(
|
53107 |
+
~~~~~~~~~~~~^
|
53108 |
+
self.checkpoint,
|
53109 |
+
^^^^^^^^^^^^^^^^
|
53110 |
+
...<3 lines>...
|
53111 |
+
self.trigger_to_nodes,
|
53112 |
+
^^^^^^^^^^^^^^^^^^^^^^
|
53113 |
+
)
|
53114 |
+
^
|
53115 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 305, in apply_writes
|
53116 |
+
if channels[chan].update(vals) and get_next_version is not None:
|
53117 |
+
~~~~~~~~~~~~~~~~~~~~~^^^^^^
|
53118 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\last_value.py", line 58, in update
|
53119 |
+
raise InvalidUpdateError(msg)
|
53120 |
+
langgraph.errors.InvalidUpdateError: At key 'next_stage': Can receive only one value per step. Use an Annotated key to handle multiple values.
|
53121 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE
|
53122 |
+
2025-06-09 13:59:36:__main__:INFO: Starting the interface
|
53123 |
+
2025-06-09 13:59:46:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53124 |
+
2025-06-09 14:00:05:__main__:INFO: Prompt: You are a helpful assistant.
|
53125 |
+
2025-06-09 14:00:23:__main__:INFO: Prompt: You are a helpful assistant.
|
53126 |
+
2025-06-09 14:00:30:__main__:ERROR: Exception occurred
|
53127 |
+
Traceback (most recent call last):
|
53128 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53129 |
+
async for stream_mode, chunk in graph.astream(
|
53130 |
+
...<57 lines>...
|
53131 |
+
yield output, gr.skip(), gr.skip()
|
53132 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2652, in astream
|
53133 |
+
while loop.tick(input_keys=self.input_channels):
|
53134 |
+
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
53135 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\loop.py", line 493, in tick
|
53136 |
+
mv_writes, updated_channels = apply_writes(
|
53137 |
+
~~~~~~~~~~~~^
|
53138 |
+
self.checkpoint,
|
53139 |
+
^^^^^^^^^^^^^^^^
|
53140 |
+
...<3 lines>...
|
53141 |
+
self.trigger_to_nodes,
|
53142 |
+
^^^^^^^^^^^^^^^^^^^^^^
|
53143 |
+
)
|
53144 |
+
^
|
53145 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 305, in apply_writes
|
53146 |
+
if channels[chan].update(vals) and get_next_version is not None:
|
53147 |
+
~~~~~~~~~~~~~~~~~~~~~^^^^^^
|
53148 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\last_value.py", line 58, in update
|
53149 |
+
raise InvalidUpdateError(msg)
|
53150 |
+
langgraph.errors.InvalidUpdateError: At key 'next_stage': Can receive only one value per step. Use an Annotated key to handle multiple values.
|
53151 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE
|
53152 |
+
2025-06-09 14:01:56:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53153 |
+
2025-06-09 14:01:57:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53154 |
+
2025-06-09 14:02:11:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53155 |
+
2025-06-09 14:02:11:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53156 |
+
2025-06-09 14:02:19:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53157 |
+
2025-06-09 14:05:00:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53158 |
+
2025-06-09 14:05:07:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53159 |
+
2025-06-09 14:05:07:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53160 |
+
2025-06-09 14:05:15:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53161 |
+
2025-06-09 14:05:58:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53162 |
+
2025-06-09 14:05:58:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53163 |
+
2025-06-09 14:06:13:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53164 |
+
2025-06-09 14:09:30:__main__:INFO: Starting the interface
|
53165 |
+
2025-06-09 14:09:35:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53166 |
+
2025-06-09 14:09:42:__main__:INFO: Prompt: You are a helpful assistant.
|
53167 |
+
2025-06-09 14:09:54:__main__:INFO: Prompt: You are a helpful assistant.
|
53168 |
+
2025-06-09 14:12:34:__main__:INFO: Starting the interface
|
53169 |
+
2025-06-09 14:12:37:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53170 |
+
2025-06-09 14:12:44:__main__:INFO: Prompt: You are a helpful assistant.
|
53171 |
+
2025-06-09 14:12:57:__main__:INFO: Prompt: You are a helpful assistant.
|
53172 |
+
2025-06-09 14:13:23:__main__:INFO: Prompt: You are a helpful assistant.
|
53173 |
+
2025-06-09 14:13:36:__main__:INFO: Prompt: You are a helpful assistant.
|
53174 |
+
2025-06-09 14:14:47:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53175 |
+
2025-06-09 14:14:47:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53176 |
+
2025-06-09 14:19:24:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53177 |
+
2025-06-09 14:19:24:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53178 |
+
2025-06-09 14:19:33:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53179 |
+
2025-06-09 14:19:40:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53180 |
+
2025-06-09 14:19:41:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53181 |
+
2025-06-09 14:20:20:__main__:INFO: Starting the interface
|
53182 |
+
2025-06-09 14:20:37:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53183 |
+
2025-06-09 14:20:55:__main__:INFO: Prompt: You are a helpful assistant.
|
53184 |
+
2025-06-09 14:21:02:__main__:ERROR: Exception occurred
|
53185 |
+
Traceback (most recent call last):
|
53186 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53187 |
+
async for stream_mode, chunk in graph.astream(
|
53188 |
+
...<56 lines>...
|
53189 |
+
yield output, gr.skip(), gr.skip()
|
53190 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
53191 |
+
raise GraphRecursionError(msg)
|
53192 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
53193 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
53194 |
+
2025-06-09 14:21:10:__main__:INFO: Prompt: You are a helpful assistant.
|
53195 |
+
2025-06-09 14:21:19:__main__:INFO: Prompt: You are a helpful assistant.
|
53196 |
+
2025-06-09 14:21:25:openai._base_client:INFO: Retrying request to /chat/completions in 20.000000 seconds
|
53197 |
+
2025-06-09 14:21:50:openai._base_client:INFO: Retrying request to /chat/completions in 20.000000 seconds
|
53198 |
+
2025-06-09 14:22:11:openai._base_client:INFO: Retrying request to /chat/completions in 20.000000 seconds
|
53199 |
+
2025-06-09 14:22:32:openai._base_client:INFO: Retrying request to /chat/completions in 20.000000 seconds
|
53200 |
+
2025-06-09 14:22:53:openai._base_client:INFO: Retrying request to /chat/completions in 20.000000 seconds
|
53201 |
+
2025-06-09 14:23:15:openai._base_client:INFO: Retrying request to /chat/completions in 20.000000 seconds
|
53202 |
+
2025-06-09 14:23:36:__main__:ERROR: Exception occurred
|
53203 |
+
Traceback (most recent call last):
|
53204 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53205 |
+
async for stream_mode, chunk in graph.astream(
|
53206 |
+
...<56 lines>...
|
53207 |
+
yield output, gr.skip(), gr.skip()
|
53208 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
53209 |
+
raise GraphRecursionError(msg)
|
53210 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
53211 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
53212 |
+
2025-06-09 14:25:15:__main__:INFO: Starting the interface
|
53213 |
+
2025-06-09 14:25:55:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53214 |
+
2025-06-09 14:26:00:__main__:INFO: Prompt: You are a helpful assistant.
|
53215 |
+
2025-06-09 14:26:10:__main__:INFO: Prompt: You are a helpful assistant.
|
53216 |
+
2025-06-09 14:26:27:__main__:INFO: Prompt: You are a helpful assistant.
|
53217 |
+
2025-06-09 14:26:32:__main__:ERROR: Exception occurred
|
53218 |
+
Traceback (most recent call last):
|
53219 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53220 |
+
async for stream_mode, chunk in graph.astream(
|
53221 |
+
...<56 lines>...
|
53222 |
+
yield output, gr.skip(), gr.skip()
|
53223 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2652, in astream
|
53224 |
+
while loop.tick(input_keys=self.input_channels):
|
53225 |
+
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
53226 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\loop.py", line 493, in tick
|
53227 |
+
mv_writes, updated_channels = apply_writes(
|
53228 |
+
~~~~~~~~~~~~^
|
53229 |
+
self.checkpoint,
|
53230 |
+
^^^^^^^^^^^^^^^^
|
53231 |
+
...<3 lines>...
|
53232 |
+
self.trigger_to_nodes,
|
53233 |
+
^^^^^^^^^^^^^^^^^^^^^^
|
53234 |
+
)
|
53235 |
+
^
|
53236 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 305, in apply_writes
|
53237 |
+
if channels[chan].update(vals) and get_next_version is not None:
|
53238 |
+
~~~~~~~~~~~~~~~~~~~~~^^^^^^
|
53239 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\last_value.py", line 58, in update
|
53240 |
+
raise InvalidUpdateError(msg)
|
53241 |
+
langgraph.errors.InvalidUpdateError: At key 'next_stage': Can receive only one value per step. Use an Annotated key to handle multiple values.
|
53242 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE
|
53243 |
+
2025-06-09 14:27:02:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53244 |
+
2025-06-09 14:27:02:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53245 |
+
2025-06-09 14:27:27:__main__:INFO: Starting the interface
|
53246 |
+
2025-06-09 14:27:30:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53247 |
+
2025-06-09 14:27:36:__main__:INFO: Prompt: You are a helpful assistant.
|
53248 |
+
2025-06-09 14:27:45:__main__:INFO: Prompt: You are a helpful assistant.
|
53249 |
+
2025-06-09 14:27:54:__main__:ERROR: Exception occurred
|
53250 |
+
Traceback (most recent call last):
|
53251 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53252 |
+
async for stream_mode, chunk in graph.astream(
|
53253 |
+
...<56 lines>...
|
53254 |
+
yield output, gr.skip(), gr.skip()
|
53255 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2677, in astream
|
53256 |
+
raise GraphRecursionError(msg)
|
53257 |
+
langgraph.errors.GraphRecursionError: Recursion limit of 20 reached without hitting a stop condition. You can increase the limit by setting the `recursion_limit` config key.
|
53258 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT
|
53259 |
+
2025-06-09 14:29:55:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53260 |
+
2025-06-09 14:29:55:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53261 |
+
2025-06-09 14:33:33:__main__:INFO: Starting the interface
|
53262 |
+
2025-06-09 14:33:37:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53263 |
+
2025-06-09 14:33:43:__main__:INFO: Prompt: You are a helpful assistant.
|
53264 |
+
2025-06-09 14:33:54:__main__:INFO: Prompt: You are a helpful assistant.
|
53265 |
+
2025-06-09 14:35:39:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53266 |
+
2025-06-09 14:35:39:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53267 |
+
2025-06-09 14:35:40:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53268 |
+
2025-06-09 14:35:48:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53269 |
+
2025-06-09 14:35:48:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53270 |
+
2025-06-09 14:36:01:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53271 |
+
2025-06-09 14:36:01:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53272 |
+
2025-06-09 14:36:26:__main__:INFO: Starting the interface
|
53273 |
+
2025-06-09 14:36:31:__main__:INFO: Greeting added for new user via handle_initial_greeting_load.
|
53274 |
+
2025-06-09 14:36:37:__main__:INFO: Prompt: You are a helpful assistant.
|
53275 |
+
2025-06-09 14:36:46:__main__:INFO: Prompt: You are a helpful assistant.
|
53276 |
+
2025-06-09 14:37:00:__main__:INFO: Prompt: You are a helpful assistant.
|
53277 |
+
2025-06-09 14:37:04:__main__:ERROR: Exception occurred
|
53278 |
+
Traceback (most recent call last):
|
53279 |
+
File "C:\myworkspace\huggingface_agents\DIY_agent\dev\DIY_assistant\app.py", line 99, in chat_fn
|
53280 |
+
async for stream_mode, chunk in graph.astream(
|
53281 |
+
...<56 lines>...
|
53282 |
+
yield output, gr.skip(), gr.skip()
|
53283 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\__init__.py", line 2652, in astream
|
53284 |
+
while loop.tick(input_keys=self.input_channels):
|
53285 |
+
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
53286 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\loop.py", line 493, in tick
|
53287 |
+
mv_writes, updated_channels = apply_writes(
|
53288 |
+
~~~~~~~~~~~~^
|
53289 |
+
self.checkpoint,
|
53290 |
+
^^^^^^^^^^^^^^^^
|
53291 |
+
...<3 lines>...
|
53292 |
+
self.trigger_to_nodes,
|
53293 |
+
^^^^^^^^^^^^^^^^^^^^^^
|
53294 |
+
)
|
53295 |
+
^
|
53296 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\pregel\algo.py", line 305, in apply_writes
|
53297 |
+
if channels[chan].update(vals) and get_next_version is not None:
|
53298 |
+
~~~~~~~~~~~~~~~~~~~~~^^^^^^
|
53299 |
+
File "C:\myworkspace\huggingface_agents\mcp-hackthon\dev\DIY_assistant\env\Lib\site-packages\langgraph\channels\last_value.py", line 58, in update
|
53300 |
+
raise InvalidUpdateError(msg)
|
53301 |
+
langgraph.errors.InvalidUpdateError: At key 'next_stage': Can receive only one value per step. Use an Annotated key to handle multiple values.
|
53302 |
+
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE
|
graph.py
CHANGED
@@ -101,8 +101,13 @@ async def download_website_text(url: str) -> str:
|
|
101 |
except Exception as e:
|
102 |
logger.error(f"Failed to download {url}: {str(e)}")
|
103 |
return f"Error retrieving website content: {str(e)}"
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
-
tools = [download_website_text, human_assistance]
|
106 |
memory = MemorySaver()
|
107 |
|
108 |
|
@@ -329,56 +334,64 @@ async def brainstorming_node(state: GraphProcessingState, config=None):
|
|
329 |
|
330 |
guidance_prompt_text = (
|
331 |
"""
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
*
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
*
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
*
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
"""
|
383 |
|
384 |
)
|
@@ -426,19 +439,19 @@ async def brainstorming_node(state: GraphProcessingState, config=None):
|
|
426 |
{
|
427 |
"type": "function",
|
428 |
"function": {
|
429 |
-
"name": "
|
430 |
-
"description": "
|
431 |
"parameters": {
|
432 |
"type": "object",
|
433 |
"properties": {
|
434 |
-
"
|
435 |
"type": "string",
|
436 |
-
"description": "The
|
437 |
}
|
438 |
},
|
439 |
-
"required": ["
|
440 |
-
}
|
441 |
-
}
|
442 |
}
|
443 |
]
|
444 |
llm = init_chat_model("mistral-large-latest", model_provider="mistralai")
|
@@ -454,7 +467,7 @@ async def brainstorming_node(state: GraphProcessingState, config=None):
|
|
454 |
*openai_messages # history youโve already converted
|
455 |
]
|
456 |
|
457 |
-
|
458 |
|
459 |
mistralmodel = "mistral-large-latest"
|
460 |
|
@@ -470,30 +483,46 @@ async def brainstorming_node(state: GraphProcessingState, config=None):
|
|
470 |
parallel_tool_calls = False,
|
471 |
)
|
472 |
|
473 |
-
|
474 |
tool_call = response.choices[0].message.tool_calls[0]
|
475 |
function_name = tool_call.function.name
|
476 |
function_params = json.loads(tool_call.function.arguments)
|
477 |
|
478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
484 |
|
485 |
-
|
486 |
-
|
487 |
-
tool_name = tool_call['name']
|
488 |
-
if tool_name == "human_assistance":
|
489 |
-
query = tool_call['args']['query']
|
490 |
-
print(f"Human input needed: {query}")
|
491 |
|
492 |
-
|
|
|
|
|
|
|
493 |
|
494 |
-
updates = {"messages": [response]}
|
495 |
-
print(' ๐ response from brainstorm', response)
|
496 |
-
print(' ๐ response tool calls', response.tool_calls)
|
497 |
|
498 |
if isinstance(response, AIMessage) and response.content:
|
499 |
print(' ๐๐ came inside the loop', response)
|
@@ -506,7 +535,7 @@ async def brainstorming_node(state: GraphProcessingState, config=None):
|
|
506 |
content = str(response.content).strip()
|
507 |
|
508 |
print('content for idea finalizing:', content)
|
509 |
-
if "
|
510 |
print('โ
final idea')
|
511 |
updates.update({
|
512 |
"brainstorming_complete": True,
|
@@ -517,21 +546,31 @@ async def brainstorming_node(state: GraphProcessingState, config=None):
|
|
517 |
|
518 |
else:
|
519 |
# tool_calls = getattr(response, "tool_calls", None)
|
520 |
-
|
521 |
-
tool_calls = getattr(assistant_msg, "tool_calls", [])
|
522 |
|
523 |
-
if
|
524 |
print('๐ ๏ธ tool call requested')
|
525 |
updates.update({
|
526 |
"tool_call_required": True,
|
527 |
"loop_brainstorming": False,
|
528 |
})
|
529 |
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
535 |
else:
|
536 |
print('๐ฌ keep brainstorming')
|
537 |
updates.update({
|
|
|
101 |
except Exception as e:
|
102 |
logger.error(f"Failed to download {url}: {str(e)}")
|
103 |
return f"Error retrieving website content: {str(e)}"
|
104 |
+
|
105 |
+
@tool
|
106 |
+
async def finalize_idea() -> str:
|
107 |
+
"""Marks the brainstorming phase as complete. This function does nothing else."""
|
108 |
+
return "Brainstorming finalized."
|
109 |
|
110 |
+
tools = [download_website_text, human_assistance,finalize_idea]
|
111 |
memory = MemorySaver()
|
112 |
|
113 |
|
|
|
334 |
|
335 |
guidance_prompt_text = (
|
336 |
"""
|
337 |
+
You are a creative and helpful AI assistant acting as a **DIY Project Brainstorming Facilitator**. Your primary goal is to collaborate with the user to finalize **ONE specific, viable DIY project idea** as efficiently and quickly as possible.
|
338 |
+
|
339 |
+
โ ๏ธ If you identify any idea that clearly meets ALL **Critical Criteria** and the user appears positive or neutral, you must finalize it **immediately** โ even if it is the very first idea proposed. Do NOT delay finalization by over-analyzing or seeking excessive confirmation.
|
340 |
+
|
341 |
+
> Your goal is NOT to perfect the idea or generate many options. Instead, **converge rapidly on a โgood enoughโ final idea** that the user can confidently pursue.
|
342 |
+
|
343 |
+
**Critical Criteria for the Final DIY Project Idea (MUST be met):**
|
344 |
+
1. **Buildable:** Achievable by an average person with basic DIY skills.
|
345 |
+
2. **Common Materials/Tools:** Uses only materials (e.g., wood, screws, glue, paint, fabric, cardboard) and basic hand tools (e.g., screwdrivers, hammers, saws, drills) commonly available in general hardware stores, craft stores, or supermarkets worldwide.
|
346 |
+
3. **Avoid Specializations:** Explicitly AVOID projects requiring specialized electronic components, 3D printing, specific brand items not universally available, or complex machinery.
|
347 |
+
4. **Tangible Product:** The final result must be a physical, tangible item.
|
348 |
+
|
349 |
+
**Your Process for Each Brainstorming Interaction Cycle:**
|
350 |
+
|
351 |
+
1. **THOUGHT:**
|
352 |
+
* Clearly state your understanding of the userโs current input or the brainstorming state (e.g., "User is seeking initial ideas," "User proposed an idea needing refinement," "We are close to finalizing an idea.").
|
353 |
+
* Outline your plan for this turn:
|
354 |
+
* Engage with the user's latest input.
|
355 |
+
* Propose or refine an idea to meet **Critical Criteria**.
|
356 |
+
* Decide if you need to ask the user a clarifying question.
|
357 |
+
* **Tool Identification (`human_assistance`):** If a question is needed for:
|
358 |
+
* Understanding user interests or skill level.
|
359 |
+
* Clarifying preferences.
|
360 |
+
* Getting feedback on a proposed idea.
|
361 |
+
* Refining the idea to meet criteria.
|
362 |
+
Clearly state your intention to use the `human_assistance` tool with the exact question as the `query`.
|
363 |
+
* **Idea Finalization Check:**
|
364 |
+
* Immediately check if the current idea satisfies ALL **Critical Criteria**.
|
365 |
+
* If yes, and the user shows no objection, **finalize immediately without waiting for multiple iterations**.
|
366 |
+
* Prioritize minimal iterations: finalize an idea at the earliest confident point.
|
367 |
+
* Remember: **good enough is final enough** โ do not delay finalization.
|
368 |
+
|
369 |
+
2. **TOOL USE (`human_assistance` - If Needed):**
|
370 |
+
* If a question is necessary, invoke `human_assistance` with your formulated query.
|
371 |
+
* (Note: The system will execute your tool call.)
|
372 |
+
|
373 |
+
3. **RESPONSE SYNTHESIS / IDEA FINALIZATION:**
|
374 |
+
* After any tool use (or if no tool was needed), synthesize your response.
|
375 |
+
* **If an idea is finalized:** respond *only* with the exact phrase:
|
376 |
+
`IDEA FINALIZED: [Name of the Idea]`
|
377 |
+
(e.g., `IDEA FINALIZED: Simple Wooden Spice Rack`)
|
378 |
+
Do NOT add extra text.
|
379 |
+
This signals the end of brainstorming.
|
380 |
+
* **If brainstorming continues:**
|
381 |
+
* Provide engaging suggestions or refinements.
|
382 |
+
* If you just called `human_assistance`, your main output may be the tool call or a brief lead-in.
|
383 |
+
* Await user response before proceeding.
|
384 |
+
|
385 |
+
**General Guidelines:**
|
386 |
+
* **Collaborative & Iterative:** Work *with* the user; this is a conversation.
|
387 |
+
* **Criteria Focused:** Gently guide ideas toward ALL **Critical Criteria**.
|
388 |
+
* **One Main Idea at a Time:** Avoid confusion by focusing discussion on a single project idea or comparable alternatives.
|
389 |
+
* **User-Centric:** Help the user find a project *they* will be happy with.
|
390 |
+
* **Clarity:** Be clear and direct.
|
391 |
+
* **Tool Protocol:** Use `human_assistance` correctly; do not answer your own questions.
|
392 |
+
* **Rapid Convergence:** Prioritize **finalizing quickly** once criteria are met; avoid endless brainstorming or perfectionism.
|
393 |
+
|
394 |
+
|
395 |
"""
|
396 |
|
397 |
)
|
|
|
439 |
{
|
440 |
"type": "function",
|
441 |
"function": {
|
442 |
+
"name": "finalize_idea",
|
443 |
+
"description": "Handles finalized ideas. Saves or dispatches the confirmed idea for the next steps. but make sure you give your response with key word IDEA FINALIZED",
|
444 |
"parameters": {
|
445 |
"type": "object",
|
446 |
"properties": {
|
447 |
+
"idea_name": {
|
448 |
"type": "string",
|
449 |
+
"description": "The name of the finalized DIY idea.",
|
450 |
}
|
451 |
},
|
452 |
+
"required": ["idea_name"]
|
453 |
+
}
|
454 |
+
}
|
455 |
}
|
456 |
]
|
457 |
llm = init_chat_model("mistral-large-latest", model_provider="mistralai")
|
|
|
467 |
*openai_messages # history youโve already converted
|
468 |
]
|
469 |
|
470 |
+
print('open ai format messaage', openai_messages_with_prompt)
|
471 |
|
472 |
mistralmodel = "mistral-large-latest"
|
473 |
|
|
|
483 |
parallel_tool_calls = False,
|
484 |
)
|
485 |
|
486 |
+
mistral_message = response.choices[0].message
|
487 |
tool_call = response.choices[0].message.tool_calls[0]
|
488 |
function_name = tool_call.function.name
|
489 |
function_params = json.loads(tool_call.function.arguments)
|
490 |
|
491 |
+
ai_message = AIMessage(
|
492 |
+
content=mistral_message.content or "", # Use empty string if blank
|
493 |
+
additional_kwargs={
|
494 |
+
"tool_calls": [
|
495 |
+
{
|
496 |
+
"id": tool_call.id,
|
497 |
+
"function": {
|
498 |
+
"name": tool_call.function.name,
|
499 |
+
"arguments": tool_call.function.arguments,
|
500 |
+
},
|
501 |
+
"type": "function", # Add this if your chain expects it
|
502 |
+
}
|
503 |
+
]
|
504 |
+
}
|
505 |
+
)
|
506 |
|
507 |
+
updates = {
|
508 |
+
"messages": [ai_message],
|
509 |
+
"tool_calls": [
|
510 |
+
{
|
511 |
+
"name": function_name,
|
512 |
+
"arguments": function_params,
|
513 |
+
}
|
514 |
+
],
|
515 |
+
"next": function_name,
|
516 |
+
}
|
517 |
|
518 |
+
print("\nfunction_name: ", function_name, "\nfunction_params: ", function_params)
|
519 |
+
print(' ๐ response from brainstorm', updates)
|
|
|
|
|
|
|
|
|
520 |
|
521 |
+
if function_name == "finalize_idea":
|
522 |
+
print('came in ๐ด๐ด๐ด๐ด๐ด')
|
523 |
+
state.brainstorming_complete = True
|
524 |
+
updates["brainstorming_complete"] = True
|
525 |
|
|
|
|
|
|
|
526 |
|
527 |
if isinstance(response, AIMessage) and response.content:
|
528 |
print(' ๐๐ came inside the loop', response)
|
|
|
535 |
content = str(response.content).strip()
|
536 |
|
537 |
print('content for idea finalizing:', content)
|
538 |
+
if "finalize_idea:" in content: # Use 'in' instead of 'startswith'
|
539 |
print('โ
final idea')
|
540 |
updates.update({
|
541 |
"brainstorming_complete": True,
|
|
|
546 |
|
547 |
else:
|
548 |
# tool_calls = getattr(response, "tool_calls", None)
|
549 |
+
|
|
|
550 |
|
551 |
+
if tool_call:
|
552 |
print('๐ ๏ธ tool call requested')
|
553 |
updates.update({
|
554 |
"tool_call_required": True,
|
555 |
"loop_brainstorming": False,
|
556 |
})
|
557 |
|
558 |
+
if tool_call:
|
559 |
+
tool_call = response.choices[0].message.tool_calls[0]
|
560 |
+
function_name = tool_call.function.name
|
561 |
+
function_params = json.loads(tool_call.function.arguments)
|
562 |
+
print("\nfunction_name: ", function_name, "\nfunction_params: ", function_params)
|
563 |
+
# for tool_call in response.tool_calls:
|
564 |
+
# tool_name = tool_call['name']
|
565 |
+
# if tool_name == "human_assistance":
|
566 |
+
# query = tool_call['args']['query']
|
567 |
+
# print(f"Human input needed: {query}")
|
568 |
+
|
569 |
+
# for tool_call in tool_calls:
|
570 |
+
# if isinstance(tool_call, dict) and 'name' in tool_call and 'args' in tool_call:
|
571 |
+
# print(f"๐ง Tool Call (Dict): {tool_call.get('name')}, Args: {tool_call.get('args')}")
|
572 |
+
# else:
|
573 |
+
# print(f"๐ง Unknown tool_call format: {tool_call}")
|
574 |
else:
|
575 |
print('๐ฌ keep brainstorming')
|
576 |
updates.update({
|