You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
执行
graph.update_state(my_read_config,{"messages": [RemoveMessage(id=m.id) for m in messages]})
会产生
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\pregel_init_.py", line 2007, in update_state
return self.bulk_update_state(config, [[StateUpdate(values, as_node)]])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\pregel_init_.py", line 1583, in bulk_update_state
current_config = perform_superstep(current_config, superstep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\pregel_init_.py", line 1524, in perform_superstep
run.invoke(
File "D:\myprog\py.projects\aigc.github\langchain\libs\core\langchain_core\runnables\base.py", line 3025, in invoke
input = context.run(step.invoke, input, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\utils\runnable.py", line 371, in invoke
ret = context.run(self.func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\graph\branch.py", line 167, in _route
result = self.path.invoke(value, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\utils\runnable.py", line 363, in invoke
ret = context.run(self.func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\prebuilt\chat_agent_executor.py", line 775, in should_continue
last_message = messages[-1]
~~~~~~~~^^^^
IndexError: list index out of range
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
执行
graph.update_state(my_read_config,{"messages": [RemoveMessage(id=m.id) for m in messages]})
会产生
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\pregel_init_.py", line 2007, in update_state
return self.bulk_update_state(config, [[StateUpdate(values, as_node)]])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\pregel_init_.py", line 1583, in bulk_update_state
current_config = perform_superstep(current_config, superstep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\pregel_init_.py", line 1524, in perform_superstep
run.invoke(
File "D:\myprog\py.projects\aigc.github\langchain\libs\core\langchain_core\runnables\base.py", line 3025, in invoke
input = context.run(step.invoke, input, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\utils\runnable.py", line 371, in invoke
ret = context.run(self.func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\graph\branch.py", line 167, in _route
result = self.path.invoke(value, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\utils\runnable.py", line 363, in invoke
ret = context.run(self.func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\miniconda3\envs\langchain\Lib\site-packages\langgraph\prebuilt\chat_agent_executor.py", line 775, in should_continue
last_message = messages[-1]
~~~~~~~~^^^^
IndexError: list index out of range
Beta Was this translation helpful? Give feedback.
All reactions