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:
gbaian10
2024-09-03 09:50:00 -04:00
committed by GitHub
parent 322d6c8dde
commit 8c0b27a85b
+8
View File
@@ -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",