pub type ConvertToLlmFn = Arc<dyn Fn(&[ChatMessage]) -> Vec<ChatMessage> + Send + Sync>;Expand description
Callback that transforms the message list before it is sent to the LLM.
The default implementation filters out ChatMessage::Custom variants because
most providers don’t understand application-specific message types. Consumers
can override this to inject custom serialization logic for their message types.
Aliased Type§
pub struct ConvertToLlmFn { /* private fields */ }