Crate llm_chain_tools

source ·
Expand description

Tool Access Module

This crate provides a collection of tools that can be used to grant the LLM (Large Language Model) access to various utilities, such as running Bash commands on your computer or performing web searches.

The main components of this module are:

  • Tool: A struct that represents an individual tool that the LLM can use.
  • ToolCollection: A collection of Tool instances.
  • create_tool_prompt_segment: A function to create a prompt that indicates the model should use the provided tools.

Example

use llm_chain_tools::{ToolCollection, create_tool_prompt_segment};
use llm_chain_tools::tools::BashTool;
use std::boxed::Box;

// Create a ToolCollection with some tools.
let mut tc = ToolCollection::new(vec![Box::new(BashTool::new())]);

// Create a prompt indicating the LLM should use the provided tools.
let prompt = "Find information about Rust programming language.";
let tool_prompt = create_tool_prompt_segment(&tc, &prompt);

Modules

  • tools: A submodule that provides a variety of pre-defined tools.

Modules

  • Commonly used tools ready to import

Structs

Traits

Functions