Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non pydantic models as accumulators #1040

Open
seriousben opened this issue Nov 19, 2024 · 0 comments
Open

Support non pydantic models as accumulators #1040

seriousben opened this issue Nov 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@seriousben
Copy link
Member

Currently when using a list or other non pydantic models as an accumulator, it returns an error AttributeError: 'list' object has no attribute model_validate.

Having normal python types like a list, string, dict, ... as an accumulator should be supported.

Example that is not supported

@indexify_function(
    accumulate=list(),
)
def accumulate(acc: List[str], data: str) -> List[str]:
  ...
@seriousben seriousben added the enhancement New feature or request label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant