import os, requests
response = requests.put(
"https://backend.talking-avatar.dev/api/talking-avatar/knowledge-bases/KNOWLEDGE_BASE_ID",
headers={
"Authorization": f"Bearer {os.environ['TALKING_AVATAR_API_KEY']}",
"API-Version": "1",
},
json={
"name": "refund_policy",
"instruction": "Use this to answer questions about refunds and returns.",
"text": "You can return any item within 30 days of delivery for a full refund.",
},
)
response.raise_for_status()
data = response.json()["data"]