community[patch]: docstrings update (#20301)

Added missed docstrings. Format docstings to the consistent form.
This commit is contained in:
Leonid Ganeline
2024-04-11 13:23:27 -07:00
committed by GitHub
parent 2900720cd3
commit 7cf2d2759d
77 changed files with 162 additions and 125 deletions

View File

@@ -28,7 +28,7 @@ def convert_pydantic_to_ernie_function(
name: Optional[str] = None,
description: Optional[str] = None,
) -> FunctionDescription:
"""Converts a Pydantic model to a function description for the Ernie API."""
"""Convert a Pydantic model to a function description for the Ernie API."""
schema = dereference_refs(model.schema())
schema.pop("definitions", None)
return {
@@ -44,7 +44,7 @@ def convert_pydantic_to_ernie_tool(
name: Optional[str] = None,
description: Optional[str] = None,
) -> ToolDescription:
"""Converts a Pydantic model to a function description for the Ernie API."""
"""Convert a Pydantic model to a function description for the Ernie API."""
function = convert_pydantic_to_ernie_function(
model, name=name, description=description
)