Description
Currently we allow CocoIndex struct to bind to dataclasses and namedtuples (doc). We want to support binding struct to dict
(or dict[str, Any]
) too - this is more handy as users don't need to define a type first.
dict
cannot be used when a specific type is required, e.g. for return type as custom functions (existing doc).
Users are even allowed to use Any
or omit type annotation to bind Struct values when a specific type is not required (e.g. for custom function arguments), just like for basic typed values type annotation is not required for function arguments.
❤️ Contributors, please refer to 📙Contributing Guide.
Unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like I'm working on it
or Can I work on this issue?
to avoid duplicating work. Our Discord server is always open and friendly.