Skip to content

[Store] Change StoreInterface to Iterator #998

@lochmueller

Description

@lochmueller

Hey everyone,

I suggest changing the StoreInterface of the Stores from in the query method from array to iterable.
Stores that are NOT based on a single HTTP request would benefit from the iterator running more memory-efficiently (also the creating of the VectorDocument could be more efficiently if we yield this one-by-one) , since the entire result wouldn't need to be collected in an array.

Depending on the use case, iterator_to_array could still be used (if necessary).

Should I create a PR?

Regards,
Tim

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)StoreIssues & PRs about the AI Store component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions