Skip to content

InjectedToolArg should be InjectedStore #8

@josiahcoad

Description

We'll that was a wasted hour trying to figure out something that ended up being a bug in this demo...

This is wrong in the tutorial:

async def upsert_memory(
    content: str,
    context: str,
    *,
    memory_id: Optional[uuid.UUID] = None,
    # Hide these arguments from the model.
    config: Annotated[RunnableConfig, InjectedToolArg],
    store: Annotated[BaseStore, InjectedToolArg],
):

should be:
store: Annotated[BaseStore, InjectedToolArg] -> store: Annotated[BaseStore, InjectedStore]

where
from langgraph.prebuilt import InjectedStore

Otherwise, you'll get an error about store not being available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions