llama-cpp-hs
Copyright(c) 2025 Tushar Adhatrao
LicenseMIT
MaintainerTushar Adhatrao <[email protected]>
Safe HaskellNone
LanguageHaskell2010

Llama.ChatTemplate

Description

 
Synopsis

Documentation

data ChatMessage Source #

Constructors

ChatMessage 

Instances

Instances details
Show ChatMessage Source # 
Instance details

Defined in Llama.ChatTemplate

Eq ChatMessage Source # 
Instance details

Defined in Llama.ChatTemplate

chatApplyTemplate Source #

Arguments

:: Maybe String

Optional custom template (uses built-in if Nothing)

-> [ChatMessage]

List of chat messages

-> Bool

Add assistant token at end?

-> Int

Buffer size (suggested: 4096)

-> IO (Either String String)

Returns formatted string or error message

Apply a chat template to format a conversation.

chatGetBuiltinTemplates :: IO [String] Source #

Get list of available built-in chat templates.