K3
October 27, 2024, 4:26pm
1
Original Discord Post by josegarciacordoba | 2024-10-27 16:26:20
import requests
import json
headers = {
‘CONVAI-API-KEY’: ‘#MyKey ’,
‘Content-Type’: ‘application/json’
}
Create a dictionary for the JSON payload
payload = {
“document_id”: “#ID ”
}
Convert the payload to JSON
json_payload = json.dumps(payload)
response = requests.post(url, headers=headers, data=json_payload)
print(response.text)
The Python example doesn’t work.
Gives error: {“ERROR”: “Error in loading knowldege bank: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.”}
K3
October 27, 2024, 5:42pm
2
Reply by josegarciacordoba | 2024-10-27 17:42:26
The list and delete functionality doesn’t work.
I’ve also tried it with Postman
K3
October 28, 2024, 9:21am
3
Reply by k3kalinix | 2024-10-28 09:21:19
I’ve informed my teammates. We’ll get back to you.
K3
October 28, 2024, 9:19pm
4
Reply by sconvai | 2024-10-28 21:19:52
<@992368851234869308> : I have confirmed that the list API is working as per the documentation. Can you please list the python program you are trying.
K3
October 28, 2024, 9:28pm
5
Reply by sconvai | 2024-10-28 21:28:43
<@992368851234869308> : I found bug with delete API call. I have fixed that. Please try again.
K3
Closed
November 25, 2024, 12:14pm
6
This conversation happened on the Convai Discord Server, so this post will be closed.