-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathlangchain_tool_demo.ainl
More file actions
20 lines (19 loc) · 897 Bytes
/
Copy pathlangchain_tool_demo.ainl
File metadata and controls
20 lines (19 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# examples/hybrid/langchain_tool_demo.ainl
# Hybrid LangChain interop: call a tool by name through the langchain_tool adapter.
#
# Run (from repo root):
# python3 -m cli.main run examples/hybrid/langchain_tool_demo.ainl --json \
# --enable-adapter langchain_tool
#
# Strict validate:
# python3 scripts/validate_ainl.py examples/hybrid/langchain_tool_demo.ainl --strict
#
# The bundled demo registers a stub for tool name "my_search_tool" inside the adapter.
# For real LangChain tools, use register_langchain_tool("name", tool) in Python before run.
L1:
# Dotted verb = tool name (strict allowlist includes MY_SEARCH_TOOL for this demo).
# Use a frame var for multi-word text (spaces break R-slot tokenization).
Set q "example query"
# Tokenization: use `->result` (no space) so the output slot is not parsed as extra args.
R langchain_tool.my_search_tool q ->result
J result