Skip to main content
Version: 0.21.x

Chat Template

POST 

http://localhost:3000/chat_template/:reader_id

Chat Template

The reader_id can be found as the model's key in the live_readers object, returned by the status endpoint. It can also be supplied at boot time for each model in the config: see here for more information.

Request​

Path Parameters

    reader_id stringrequired

    The ID of the reader to use for tokenization.

Body

required

    add_generation_prompt booleannullable
    inputs array[]required

Responses​

Takes in a JSON payload and returns the response all at once.

Schema

    add_generation_prompt booleannullable
    inputs array[]required
curl -L 'http://localhost:3000/chat_template/:reader_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"add_generation_prompt": true,
"inputs": [
[
{
"content": "string",
"role": "string"
}
]
]
}'
Request Collapse all
Base URL
http://localhost:3000
Parameters
— pathrequired
Body required
{
  "add_generation_prompt": true,
  "inputs": [
    [
      {
        "content": "string",
        "role": "string"
      }
    ]
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!