Source code for langchain_community.tools.clickup.tool
"""This tool allows agents to interact with the clickup libraryand operate on a Clickup instance.To use this tool, you must first set as environment variables: client_secret client_id codeBelow is a sample script that uses the Clickup tool:```pythonfrom langchain_community.agent_toolkits.clickup.toolkit import ClickupToolkitfrom langchain_community.utilities.clickup import ClickupAPIWrapperclickup = ClickupAPIWrapper()toolkit = ClickupToolkit.from_clickup_api_wrapper(clickup)```"""fromtypingimportOptionalfromlangchain_core.callbacksimportCallbackManagerForToolRunfromlangchain_core.toolsimportBaseToolfrompydanticimportFieldfromlangchain_community.utilities.clickupimportClickupAPIWrapper
[docs]classClickupAction(BaseTool):# type: ignore[override]"""Tool that queries the Clickup API."""api_wrapper:ClickupAPIWrapper=Field(default_factory=ClickupAPIWrapper)mode:strname:str=""description:str=""def_run(self,instructions:str,run_manager:Optional[CallbackManagerForToolRun]=None,)->str:"""Use the Clickup API to run an operation."""returnself.api_wrapper.run(self.mode,instructions)