Skip to main content

inject_tool_catalog

Function inject_tool_catalog 

Source
pub fn inject_tool_catalog(messages: &mut Vec<ChatMessage>, catalog: &str)
Expand description

Inject a tool catalog into the system prompt of a message list.

If the first message is a system message, the catalog is appended to it. Otherwise a new system message is inserted at position 0.