Skip to content

Commit

Permalink
Fix requests wrapper refactor (#2417)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerwelborn authored Apr 5, 2023
1 parent 4183204 commit d6d6f32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions langchain/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ def get(self, url: str, **kwargs: Any) -> str:

def post(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:
"""POST to the URL and return the text."""
return self.requests.post(url, json=data, headers=self.headers, **kwargs).text
return self.requests.post(url, data, **kwargs).text

def patch(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:
"""PATCH the URL and return the text."""
return self.requests.patch(url, json=data, headers=self.headers, **kwargs).text
return self.requests.patch(url, data, **kwargs).text

def put(self, url: str, data: Dict[str, Any], **kwargs: Any) -> str:
"""PUT the URL and return the text."""
return self.requests.put(url, json=data, headers=self.headers, **kwargs).text
return self.requests.put(url, data, **kwargs).text

def delete(self, url: str, **kwargs: Any) -> str:
"""DELETE the URL and return the text."""
return self.requests.delete(url, headers=self.headers, **kwargs).text
return self.requests.delete(url, **kwargs).text

async def aget(self, url: str, **kwargs: Any) -> str:
"""GET the URL and return the text asynchronously."""
Expand Down

0 comments on commit d6d6f32

Please sign in to comment.