Dedicated.ChatRender

Chat render

Given a list of messages forming a conversation, the API renders them into the final prompt text that will be sent to the model.

post/dedicated/v1/chat/render

Request

Headers

X-Friendli-Teamstring nullable

ID of team to run requests as (optional parameter).

Request body

modelstring required

ID of target endpoint. If you want to send request to specific adapter, use the format "YOUR_ENDPOINT_ID:YOUR_ADAPTER_ROUTE". Otherwise, you can just use "YOUR_ENDPOINT_ID" alone.

chat_template_kwargsobject nullable

Additional keyword arguments supplied to the template renderer. These parameters will be available for use within the chat template.

Example request

{
  "messages": [
    {
      "content": "You are a helpful assistant.",
      "role": "system"
    },
    {
      "content": "Hello!",
      "role": "user"
    }
  ],
  "model": "(endpoint-id)"
}

Response

Successfully rendered chat messages into prompt text.

textstring required

The rendered text.

Changes

No recorded changes to this operation across all 1 revision of this API.