POST
/
ai-assistants
/
llm-states
/
{assistant_id}
curl --request POST \
  --url https://api.puretalk.ai/api/ai-assistants/llm-states/{assistant_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "llm_states": [
    {
      "state_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "description": "<string>",
      "prompt": "<string>",
      "children": [
        {}
      ],
      "parameters": {},
      "position": {
        "x": 123,
        "y": 123
      },
      "tools": [
        {
          "type": "<string>",
          "functionId": "<string>",
          "function": {
            "name": "<string>",
            "description": "<string>",
            "parameters": {
              "start_time": "<string>",
              "end_time": "<string>"
            }
          }
        }
      ]
    }
  ]
}'
{
  "err": true,
  "msg": "<string>"
}

Children Schema

The Children schema represents a state in the LLM (Language Learning Model) with various properties such as state_id, name, description, prompt, parameters, position, and tools.

Recursive Children Property

One of the key features of the Children schema is the children property. This property allows a children to have nested childrens, creating a hierarchical structure. Each children can, in turn, have its own children, allowing for a recursive definition of states.

{
  "state_id": "a4a4f3fd-cc53-421e-a794-cf6ec47e96b1",
  "name": "warm_intro",
  "description": "warm_intro description",
  "prompt": "## Background about Property...",
  "children": [
    {
      "state_id": "abe03fd0-e093-4bd7-bda0-583c31eed973",
      "name": "callback",
      "description": "Transition to schedule a callback",
      "prompt": "## Background\nBusiness Hour:...",
      "children": []
    },
    {
      "state_id": "3d084435-e5b6-4691-b9ea-b773e2726ebe",
      "name": "schedule_tour",
      "description": "Transition to schedule an in person tour",
      "prompt": "## Background about Property...",
      "children": []
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

assistant_id
string
required

The ID of the assistant

Body

application/json
llm_states
object[]

Response

200
application/json
LLM states response
err
boolean
required
msg
string
required