Skip to content

List Templates

GET
/api/v1/chat/templates

List templates with optional filters.

Supports filtering by:

  • Owner ID (user’s own templates)
  • Public visibility
  • Tags (any tag matches)

Args: conn: Database connection (injected) owner_id: Optional owner filter include_public: Whether to include public templates tags: Optional tag filter limit: Maximum results offset: Pagination offset

Returns: List of matching templates with total count

owner_id
Any of:
string

Filter by owner ID

include_public
Include Public

Include public templates

boolean
default: true

Include public templates

tags
Any of:
Array<string>

Filter by tags (any match)

limit
Limit

Maximum results

integer
default: 50 >= 1 <= 100

Maximum results

offset
Offset

Pagination offset

integer
0

Pagination offset

Successful Response

TemplateListResponse

Response for template list endpoint.

object
templates
required
Templates
Array<object>
ChatTemplate

A reusable chat template with persona and configuration defaults.

object
id
Any of:
string
name
required
Name
string
>= 1 characters <= 100 characters
description
Any of:
string
tags
Tags
Array<string>
owner_id
Any of:
string
is_public
Is Public

Whether template is publicly visible

boolean
persona
Any of:
string
<= 200 characters
instructions
Instructions

Behavior instructions

Array<string>
roles
required
RoleConfig

Role configuration with system prompt

object
system_prompt
required
System Prompt

The system prompt defining the role’s behavior

string
name
Any of:
string
description
Any of:
string
default_context_mode
ContextMode

How to provide context to the LLM.

string
default: rag
Allowed values: rag attachment hybrid document none
default_rag_config
Any of:
RAGConfig

Complete RAG configuration for a chat query.

object
sources
required
Sources
Array<object>
>= 1 items <= 10 items
DataSourceConfig

Configuration for a single data source in RAG.

object
name
required
Name
string
model_name
required
Model Name
string
metadata_filters
Any of:
object
key
additional properties
any
limit
Limit
integer
default: 5 >= 1 <= 50
similarity_threshold
Similarity Threshold
number
default: 0.5 <= 1
weight
Weight
number
default: 1 <= 10
retrieval_strategy
RetrievalStrategy

How to combine results from multiple sources.

string
default: merge
Allowed values: merge sequential ensemble
max_total_results
Max Total Results
integer
default: 10 >= 1 <= 50
include_content
Include Content
boolean
default: true
default_attachment_config
Any of:
AttachmentConfig

Configuration for attachment-based context retrieval.

object
attachments
Attachments

Explicit document attachments

Array<object>
<= 20 items
Attachment

A document attachment for explicit context selection.

object
storage_key
required
Storage Key

Storage path to the document

string
title
Any of:
string
max_tokens
Any of:
integer
include_full_content
Include Full Content

Include full document content (vs summary/excerpts)

boolean
default: true
llm_model
Llm Model
string
default: gpt-4o-mini
temperature
Temperature
number
default: 0.7 <= 2
max_tokens
Max Tokens
integer
default: 2048 >= 100 <= 8000
total
required
Total
integer

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object