Hi @mthekid
have you tried return_direct option?
from langchain.tools import tool
@tool(return_direct=True)
def lookup_user(user_id: str) -> str:
"""Return user details directly without a follow-up LLM turn."""
return do_lookup(user_id)
Hi @mthekid
have you tried return_direct option?
from langchain.tools import tool
@tool(return_direct=True)
def lookup_user(user_id: str) -> str:
"""Return user details directly without a follow-up LLM turn."""
return do_lookup(user_id)