bob_llm.tool_utils

Attributes

TYPE_MAP

Classes

FunctionParameters

dict() -> new empty dictionary

FunctionDefinition

dict() -> new empty dictionary

Tool

dict() -> new empty dictionary

Functions

register(→ List[Tool])

Inspects a module and builds a list of OpenAI-compatible tool definitions

Module Contents

class bob_llm.tool_utils.FunctionParameters

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

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

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

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

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

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

Inspects a module and builds a list of OpenAI-compatible tool definitions from its functions. It ignores functions starting with ‘_’ and ‘register’.