GoogleDriveToolkit

GoogleDriveToolkit(
    *,
    credentials: Credentials,
    download_folder: Path | str,
    exclude: list[Literal['list_drive_files_and_folders''download_file_from_drive']] | None = None,
    api_version: str = 'v3'
)
A tool map for Google Drive.
Initialize the Google Drive tool map.
Parameters:
NameDescription
credentialsType: Credentials
download_folderType: pathlib.Path | str
excludeType: list[typing.Literal[‘list_drive_files_and_folders’, ‘download_file_from_drive’]] | None

Default: None
api_versionType: str

Default: ‘v3’

Static Methods

recommended_scopes() -> list[str]
Return the recommended scopes manatory for using tools from this tool map.

Instance Attributes

tools


Get the list of tools in the set.

Instance Methods

get_tool

get_tool(self, tool_name: str) -> Tool
Get a tool from the set by name.
Parameters:
NameDescription
tool_nameThe name of the tool to get.

Type: str
Returns:
TypeDescription
ToolTool: The tool with the given name.

register_for_execution

register_for_execution(self, agent: ConversableAgent) -> 
Register the tools in the set with an agent for Parameters:
NameDescription
agentThe agent to register the tools with.

Type: ConversableAgent

register_for_llm

register_for_llm(self, agent: ConversableAgent) -> 
Register the tools in the set with an LLM agent.
Parameters:
NameDescription
agentThe LLM agent to register the tools with.

Type: ConversableAgent

remove_tool

remove_tool(self, tool_name: str) -> None
Remove a tool from the set by name.
Parameters:
NameDescription
tool_nameThe name of the tool to remove.

Type: str

set_tool

set_tool(self, tool: Tool) -> None
Set a tool in the set.
Parameters:
NameDescription
toolThe tool to set.

Type: Tool