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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
requests wrapper #2367
requests wrapper #2367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be helpful - Thanks! I prefer this to the other PRs in this vein, assuming we get the validation errors to work
class RequestsWrapper(BaseModel): | ||
"""Lightweight wrapper around requests library.""" | ||
|
||
class Requests(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add a docstring
langchain/requests.py
Outdated
|
||
async def adelete(self, url: str, **kwargs: Any) -> str: | ||
"""DELETE the URL and return the text asynchronously.""" | ||
response = await self.requests.aget(url, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be self.requests.adelete(url, **kwargs)
instead of self.requests.aget(url, **kwargs)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes good catch, thanks
No description provided.