Skip to content

Commit d6d6f32

Browse files
authored
Fix requests wrapper refactor (langchain-ai#2417)
langchain-ai#2367
1 parent 4183204 commit d6d6f32

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

langchain/requests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,19 @@ def get(self, url: str, **kwargs: Any) -> str:
110110

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

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

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

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

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

0 commit comments

Comments
 (0)