experimental: docstrings update (#18048)

Added missed docstrings. Formatted docsctrings to the consistent format.
This commit is contained in:
Leonid Ganeline
2024-02-23 18:24:16 -08:00
committed by GitHub
parent 56b955fc31
commit 3f6bf852ea
61 changed files with 316 additions and 102 deletions

View File

@@ -24,6 +24,7 @@ def _get_default_python_repl() -> PythonREPL:
def sanitize_input(query: str) -> str:
"""Sanitize input to the python REPL.
Remove whitespace, backtick & python (if llm mistakes python console as terminal)
Args:
@@ -41,7 +42,7 @@ def sanitize_input(query: str) -> str:
class PythonREPLTool(BaseTool):
"""A tool for running python code in a REPL."""
"""Tool for running python code in a REPL."""
name: str = "Python_REPL"
description: str = (
@@ -76,11 +77,13 @@ class PythonREPLTool(BaseTool):
class PythonInputs(BaseModel):
"""Python inputs."""
query: str = Field(description="code snippet to run")
class PythonAstREPLTool(BaseTool):
"""A tool for running python code in a REPL."""
"""Tool for running python code in a REPL."""
name: str = "python_repl_ast"
description: str = (