Skip to content

Lazy question: how to achieve something like OpenAI sdk RunContext or hooks with ellmer #871

Description

@sounkou-bioinfo

Hi all,
Thank you for this great package!

This is s neophyte question, but I figure I should ask anyway !
One interesting and usefull feature of the openai agent sdk is the concept of RunContext and toolContext objects
https://github.com/openai/openai-agents-python/blob/main/docs/context.md.

They basically provide objects that are accessible to all tool calls (or hooks) within a run of the model. This provides a way to get some private (likely complex objects) data accessible to tools calls, link to specific runs but not accessible to the model. This is also a way to have side effects (like logging)

In the same vein, beside wrapping the tools calls ourselves with logging and other facilities, are they ways to have register hooks https://openai.github.io/openai-agents-js/openai/agents/classes/agenthooks/?

Thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions