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
include_public
Include Public boolean
default: true
tags
Any of:
Filter by tags (any match)
limit
Limit integer
default: 50 >= 1 <= 100
Select media type application/json TemplateListResponse Response for template list endpoint.
object Templates Array<object>
ChatTemplate A reusable chat template with persona and configuration defaults.
object Name string
>= 1 characters <= 100 characters
is_public
Is Public Whether template is publicly visible
boolean
instructions
Instructions Array<string>
RoleConfig Role configuration with system prompt
object System Prompt The system prompt defining the role’s behavior
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 Array<object>
>= 1 items <= 10 items
DataSourceConfig Configuration for a single data source in RAG.
object metadata_filters
Any of:
object key additional properties
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 Storage path to the document
string
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
Select media type application/json HTTPValidationError object detail
Detail Array<object>
ValidationError object