Aan de slagGa gratis aan de slag

Conditional tool calls

Deze oefening maakt deel uit van de cursus

Multi-Agent Systems with LangGraph

Cursus bekijken

Oefeninstructies

Run the first two cells to install the libraries and re-define the tools

  • Re-bind the LLM with the tools to make it tool-aware.
  • Create nodes for the LLM and tools called "llm" and "tools", respectively
  • Add the edges to enable conditional tool use: add standard edges connecting the LLM to START and END, and create a conditional edge to route to "tools" if the tool_condition function is met, and END if not.


Note: If you’re running DataLab in Restricted Mode, this exercise isn’t supported yet. We’re actively working on making it available in the future.


Praktische interactieve oefening

Zet theorie om in actie met een van onze interactieve oefeningen.

Begin met trainen