Skip to content

Support ReST-style docstrings when loading tools from function #7

@bilgeyucel

Description

@bilgeyucel

Is your feature request related to a problem? Please describe.
Currently we will need to use Annotated parameters for functions to be smoothly parsed as tools. This is not the standard documentation practice in Python however, and would often need manual labor for tool creators to convert standard python functions to tools. And this manual labor is usually copying from the ReST docstring and pasting to the Annotated description.

Describe the solution you'd like
Make create_tool_from_function support ReST-styled docstrings by default. See deepset-ai#9004

Describe alternatives you've considered

Additional context
This was a small upgrade when I was working on my personal project, but I feel like this can be standardized as a common feature. So here's the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions