Skip to main content

Crate lc_tools

Crate lc_tools 

Source
Expand description

Built-in tools for langchainrust.

Provides a collection of ready-to-use tools for agents:

  • Calculator: Math expression evaluation
  • DateTimeTool: Date/time queries and calculations
  • SimpleMathTool: Advanced math operations
  • PythonREPLTool: Python code execution (disabled by default)
  • DuckDuckGoSearchTool: Web search via DuckDuckGo
  • URLFetchTool: Web page fetching and parsing
  • WikipediaTool: Wikipedia search
  • FileTool: Sandboxed file operations
  • HTTPTool: HTTP requests with SSRF protection
  • SQLTool: Read-only SQL queries (feature-gated)
  • ComputerUseTool: Screen interaction via Anthropic API
  • SandboxTool / LocalSandbox: Code execution sandbox

Re-exports§

pub use extended::ComputerMode;
pub use extended::ComputerUseInput;
pub use extended::ComputerUseOutput;
pub use extended::ComputerUseTool;
pub use extended::FileTool;
pub use extended::HTTPTool;
pub use sandbox::CodeSandbox;
pub use sandbox::Language;
pub use sandbox::LocalSandbox;
pub use sandbox::RunResult;
pub use sandbox::SandboxError;
pub use sandbox::SandboxTool;

Modules§

extended
工具扩展:HTTP / File / SQL / ComputerUse
sandbox
Code Interpreter Sandbox for secure code execution.

Structs§

Calculator
Calculator tool
CalculatorInput
Calculator input
CalculatorOutput
Calculator output
DateTimeInput
DateTime tool input parameters.
DateTimeOutput
DateTime tool output result.
DateTimeTool
DateTime tool for querying and manipulating dates and times.
DuckDuckGoSearchTool
DuckDuckGo 网页搜索工具
MathInput
Math tool input parameters.
MathOutput
Math tool output result.
PythonREPLInput
Python REPL 工具输入
PythonREPLOutput
Python REPL 工具输出
PythonREPLTool
Python 代码执行工具
SearchInput
搜索工具输入
SearchOutput
搜索工具输出
SimpleMathTool
Advanced math tool for agents.
URLFetchInput
URLFetch 工具输入
URLFetchOutput
URLFetch 工具输出
URLFetchTool
网页抓取工具
WikipediaInput
Wikipedia 工具输入
WikipediaOutput
Wikipedia 工具输出
WikipediaTool
Wikipedia 搜索工具

Enums§

ToolError
Tool error type.

Traits§

BaseTool
Base tool trait (object-safe version).
Tool
Generic tool trait (type-safe version).

Attribute Macros§

tool
The #[tool] procedural macro.