mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-17 21:25:46 +02:00
docs: fix Corrective RAG (CRAG) miss function (#1563)
`Corrective RAG (CRAG) using local LLMs` miss `find_tool_calls_react` function
This commit is contained in:
@@ -429,6 +429,14 @@
|
||||
"]\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def find_tool_calls_react(messages):\n",
|
||||
" \"\"\"\n",
|
||||
" Find all tool calls in the messages returned\n",
|
||||
" \"\"\"\n",
|
||||
" tool_calls = [tc['name'] for m in messages['messages'] for tc in getattr(m, 'tool_calls', [])]\n",
|
||||
" return tool_calls\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def check_trajectory_react(root_run: Run, example: Example) -> dict:\n",
|
||||
" \"\"\"\n",
|
||||
" Check if all expected tools are called in exact order and without any additional tool calls.\n",
|
||||
|
||||
Reference in New Issue
Block a user