ToolBuilder

ToolBuilder(
    corpus_root,
    retriever='all-mpnet-base-v2',
    type='default'
)
Parameters:
NameDescription
corpus_root
retriever='all-mpnet-base-v2'
type='default'

Class Attributes

TOOL_PROMPT_DEFAULT



TOOL_PROMPT_USER_DEFINED



Instance Methods

bind

bind(
    self,
    agent: AssistantAgent,
    functions: str
) -> 

Binds the function to the agent so that agent is aware of it.

Parameters:
NameDescription
agentType: AssistantAgent
functionsType: str

bind_user_proxy

bind_user_proxy(
    self,
    agent: UserProxyAgent,
    tool_root: str | list
) -> 

Updates user proxy agent with a executor so that code executor can successfully execute function-related code.
Returns an updated user proxy.

Parameters:
NameDescription
agentType: UserProxyAgent
tool_rootType: str | list

retrieve

retrieve(
    self,
    query,
    top_k=3
) -> 
Parameters:
NameDescription
query
top_k=3