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

Add documentaion and/or type annotations for the response objects #212

Closed
yifeikong opened this issue Apr 30, 2024 · 2 comments
Closed

Add documentaion and/or type annotations for the response objects #212

yifeikong opened this issue Apr 30, 2024 · 2 comments

Comments

@yifeikong
Copy link

Recently, I've been using this package to write a RAG application, however, I need to actually run the lib to know the response fields.

The current return type of .text() etc, is Dict:

List of dictionaries with search results.

which is too generic for the users and linters.

Describe the solution you'd like

Can we change the return type to a TypedDict or a pydantic model? The fields would be more explicit this way. At least, common fields such as title and body should be documented.

@deedy5
Copy link
Owner

deedy5 commented May 13, 2024

TypedDict is a good idea 👍
But there is no time yet, I will update README or add TypedDict later.

@deedy5
Copy link
Owner

deedy5 commented Jul 3, 2024

Fixed in v6.1.8
Examples of results added to README

@deedy5 deedy5 closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants