From 971d29e7182739c606d2e0d0c261029d315bea82 Mon Sep 17 00:00:00 2001 From: Leonid Ganeline Date: Thu, 22 Feb 2024 15:55:01 -0800 Subject: [PATCH] docs: robocorpai dosctrings (#17968) Added missing docstrings --------- Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com> --- libs/partners/robocorp/langchain_robocorp/toolkits.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libs/partners/robocorp/langchain_robocorp/toolkits.py b/libs/partners/robocorp/langchain_robocorp/toolkits.py index 92f082667f..aab04859e6 100644 --- a/libs/partners/robocorp/langchain_robocorp/toolkits.py +++ b/libs/partners/robocorp/langchain_robocorp/toolkits.py @@ -33,7 +33,14 @@ LLM_TRACE_HEADER = "X-action-trace" class RunDetailsCallbackHandler(BaseCallbackHandler): + """Callback handler to add run details to the run.""" + def __init__(self, run_details: dict) -> None: + """Initialize the callback handler. + + Args: + run_details (dict): Run details. + """ self.run_details = run_details def on_tool_start( @@ -50,10 +57,14 @@ class RunDetailsCallbackHandler(BaseCallbackHandler): class ToolInputSchema(BaseModel): + """Tool input schema.""" + question: str = Field(...) class ToolArgs(TypedDict): + """Tool arguments.""" + name: str description: str callback_manager: CallbackManager