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

standardise return type of pipelines and nodes #821

Closed
lalitpagaria opened this issue Feb 10, 2021 · 1 comment
Closed

standardise return type of pipelines and nodes #821

lalitpagaria opened this issue Feb 10, 2021 · 1 comment
Labels
type:feature New feature or request

Comments

@lalitpagaria
Copy link
Contributor

lalitpagaria commented Feb 10, 2021

Is your feature request related to a problem? Please describe.

Currently most of nodes (retriever, reader, generator, summerizer, translator, document_store, preprocessor etc) and pipelines (qa, faq, doc_search, generator, etc) return type is generic dict. Also they have non-standard return type (missing strict type checking) means some return list of docs, some list of docs in dict, and some list of answer in dict.

I have faced this issue while working on #782.

Describe the solution you'd like

Better to standardise return type with pydentic BaseModel to reduce the confusion and having strict type checking. Also user have clarity about what output to expect from node or pipeline.

@lalitpagaria lalitpagaria added the type:feature New feature or request label Feb 10, 2021
@lalitpagaria lalitpagaria changed the title standardise return type for pipelines and nodes standardise return type of pipelines and nodes Feb 10, 2021
@tholor
Copy link
Member

tholor commented Feb 11, 2021

Yep, already on our roadmap. Will be part of #600. I will post a comment there and close this issue so that we have everything in one place...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants