Skip to content

[FEATURE] Pre-Tokenized Tools #1621

@Unshure

Description

@Unshure

Problem Statement

I would like to take advantage of pre-tokenized tool specs provided by different model providers: https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-anthropic-claude-messages-tool-use.html#model-parameters-anthropic-anthropic-defined-tools

Proposed Solution

Add a special metadata flag to the @tool decorator flag that model providers can read in order to use the pre-tokenized version of the tool:

@tool(pre-tokenized: {type: str, name: str})
def memory():
...

Use Case

Take advantage of certain models pre-tokenized tool specifications

Alternatives Solutions

No response

Additional Context

Related issues: #965

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions