forked from phoenix/litellm-mirror
(feat) API custom callbacks
This commit is contained in:
parent
47b8715d25
commit
aa333161a8
2 changed files with 6 additions and 3 deletions
|
@ -106,15 +106,14 @@ class GenericAPILogger:
|
|||
|
||||
import json
|
||||
|
||||
payload = json.dumps(payload)
|
||||
data = {
|
||||
"data": payload,
|
||||
}
|
||||
|
||||
data = json.dumps(data)
|
||||
print_verbose(f"\nGeneric Logger - Logging payload = {data}")
|
||||
|
||||
# make request to endpoint with payload
|
||||
response = requests.post(self.endpoint, data=data, headers=self.headers)
|
||||
response = requests.post(self.endpoint, json=data, headers=self.headers)
|
||||
|
||||
response_status = response.status_code
|
||||
response_text = response.text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue