Skip to content

tool_context() equivalent: per-conversation store and tool-calling context #425

Description

@cpsievert

ellmer recently added tool_context() plus a per-conversation chat$store environment (tidyverse/ellmer#1023, part of tidyverse/ellmer#871). Tools can use it to access per-conversation state without globals, and it survives clone(deep = TRUE).

chatlas has no equivalent: there's no contextvar-based way for a running tool to access the current chat/tool-call context, and no per-chat mutable store.

Possible shape on the Python side: a tool_context() accessor backed by a contextvars.ContextVar set around tool invocation, plus a chat.store dict (or similar) that tools can read/write.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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