Skip to content

[Go] [Breaking Change] ai.ToolContext should have type parameter for original input #4101

@apascal07

Description

@apascal07

Describe the bug
ai.ToolContext has a field OriginalInput with type any; this type should actually be the input type of the tool. This is a debatable change though because some or even most tools won't have interrupts and as such ai.ToolContext.OriginalInput will not be used but all tools will nonetheless have to have a more unwieldy function signature. For tools that do use interrupts, you can get a strongly typed input with ai.OriginalInputAs[T].

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggo

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions