Skip to content

How to get distinct x number of threads with metadata filtering #278

@Hiraveb

Description

@Hiraveb

How to get distinct x number of threads with metadata filtering, so ai agent can show all threads in the sidebar

since mongodb checkpointer updated, on how metadata stored, this migration created some breaking changes. do we have any interface which can handle both of these type of docs

        old_format_match = {
            "metadata.user_id": user_id_binary,
            "metadata.assistant_id": assistant_id_binary,
        }

        new_format_match = {
            "metadata.user_id": {"$type": "array"},
            "metadata.assistant_id": {"$type": "array"},
        }

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