add tools.py
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
Utility tools used by the deep agent.
|
||||
|
||||
The functions are decorated with `@tool` from langchain and can be called by the agent.
|
||||
"""
|
||||
|
||||
from langchain.tools import tool
|
||||
|
||||
@tool
|
||||
def echo(text: str) -> str:
|
||||
"""Return the same text – useful for demonstration."""
|
||||
return f"Echo: {text}"
|
||||
|
||||
@tool
|
||||
def add(a: int, b: int) -> int:
|
||||
"""Add two integers."""
|
||||
return a + b
|
||||
Reference in New Issue
Block a user