Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.03 KB

personalise.md

File metadata and controls

40 lines (30 loc) · 1.03 KB
description
This feature is currently experimental.

/personalise

Transform any piece of text into something your Character would say. For example, imagine we want our London taxi driver character to say "Hello", our personalise endpoint will return:

"Alright mate!"

{% swagger src="https://api.carterlabs.ai/openapi.json" path="/personalise" method="post" %} https://api.carterlabs.ai/openapi.json {% endswagger %}

import requests
import json

reqUrl = "https://api.carterlabs.ai/personalise"

headersList = {
 "Accept": "*/*",
 "Content-Type": "application/json" 
}

payload = json.dumps({
  "key": "API KEY",
  "text": "Hello",
  "user_id": "UNIQUE USER ID",
  "speak": False
})

response = requests.request("POST", reqUrl, data=payload,  headers=headersList)

print(response.content)

{% hint style="warning" %} Important: See user-id-best-practices.md to learn how to choose a good user_id value. {% endhint %}