Add documentaion and/or type annotations for the response objects
yifeikong opened this issue · comments
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
:
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.
TypedDict is a good idea 👍
But there is no time yet, I will update README or add TypedDict later.