Skip to content

More ergonomic tool usage #17

@mudkipdev

Description

@mudkipdev
class WebSearch(
    Tool[WebSearchRequest, list[SearchResult | ImageResult]],
    name="web_search",
    description="Perform a search query to find web pages.",
):
    ...

In my own codebase I have created this custom system above to define tools. I randomly came across your project on 𝕏 and thought it was great but this way of setting name and description could make it better. I also have the output as a generic which is serialized with pydantic instead of ToolOk(output=str(...)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions