Documentation
¶
Index ¶
Constants ¶
View Source
const ( HistoryLimit = 20 SystemPolicy = `` /* 683-byte string literal not displayed */ ToolAttemptResponse = "Side questions cannot use tools. Ask using only the supplied conversation context." )
Variables ¶
This section is empty.
Functions ¶
func BuildMessages ¶
func BuildMessages(snapshot []llm.Message, history []Entry, question, providerName, model string, runtimeInputLimit int) ([]llm.Message, error)
BuildMessages constructs a bounded provider request. It preserves the exact main-session prefix whenever possible for prompt-cache reuse, then drops old side history before trimming main history at complete user-turn boundaries.
func CloneMessages ¶
CloneMessages returns a point-in-time deep copy without changing provider protocol metadata. Request construction performs sanitization once after all context fragments have been assembled.
Types ¶
type Entry ¶
type Entry struct {
Question string `json:"question"`
Response string `json:"response"`
CreatedAt time.Time `json:"created_at"`
Usage llm.Usage `json:"usage"`
}
func AppendHistory ¶
Click to show internal directories.
Click to hide internal directories.