bob_llm.tool_utils

Attributes

TYPE_MAP

Classes

FunctionParameters

Parameters for a function definition.

FunctionDefinition

Definition of a function for an LLM tool.

Tool

OpenAI-compatible tool definition.

Functions

register(→ List[Tool])

Inspect a module and build a list of tool definitions.

Module Contents

class bob_llm.tool_utils.FunctionParameters

Bases: TypedDict

Parameters for a function definition.

type: str
properties: Dict[str, Any]
required: List[str]
class bob_llm.tool_utils.FunctionDefinition

Bases: TypedDict

Definition of a function for an LLM tool.

name: str
description: str
parameters: FunctionParameters
class bob_llm.tool_utils.Tool

Bases: TypedDict

OpenAI-compatible tool definition.

type: str
function: FunctionDefinition
bob_llm.tool_utils.TYPE_MAP
bob_llm.tool_utils.register(module: Any, node: Any = None) List[Tool]

Inspect a module and build a list of tool definitions.

It ignores functions starting with ‘_’ and ‘register’.