Error API knowledge-bank

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.”}

Reply by josegarciacordoba | 2024-10-27 17:42:26

The list and delete functionality doesn’t work.

I’ve also tried it with Postman

Reply by k3kalinix | 2024-10-28 09:21:19

I’ve informed my teammates. We’ll get back to you.

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.

Reply by sconvai | 2024-10-28 21:28:43

<@992368851234869308> : I found bug with delete API call. I have fixed that. Please try again.

This conversation happened on the Convai Discord Server, so this post will be closed.