Skip to content

Commit 8a429f8

Browse files
committed
Addressed reveiew comments
1 parent 5b57bf1 commit 8a429f8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/unstract/llmwhisperer/client_v2.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
LLMWhispererClientException: Exception raised for errors in the LLMWhispererClient.
1919
"""
2020

21-
import copy
2221
import json
2322
import logging
2423
import os
@@ -504,9 +503,7 @@ def register_webhook(self, url: str, auth_token: str, webhook_name: str) -> dict
504503
"webhook_name": webhook_name,
505504
}
506505
url = f"{self.base_url}/whisper-manage-callback"
507-
headersx = copy.deepcopy(self.headers)
508-
headersx["Content-Type"] = "application/json"
509-
req = requests.Request("POST", url, headers=headersx, json=data)
506+
req = requests.Request("POST", url, headers=self.headers, json=data)
510507
prepared = req.prepare()
511508
s = requests.Session()
512509
response = s.send(prepared, timeout=self.api_timeout)
@@ -543,9 +540,7 @@ def update_webhook_details(self, webhook_name: str, url: str, auth_token: str) -
543540
"webhook_name": webhook_name,
544541
}
545542
url = f"{self.base_url}/whisper-manage-callback"
546-
headersx = copy.deepcopy(self.headers)
547-
headersx["Content-Type"] = "application/json"
548-
req = requests.Request("PUT", url, headers=headersx, json=data)
543+
req = requests.Request("PUT", url, headers=self.headers, json=data)
549544
prepared = req.prepare()
550545
s = requests.Session()
551546
response = s.send(prepared, timeout=self.api_timeout)

0 commit comments

Comments
 (0)