MCPcopy Create free account
hub / github.com/evilsocket/cake / encode_message

Method encode_message

cake-core/src/models/common/chatml_history.rs:19–25  ·  view source on GitHub ↗
(message: &Message)

Source from the content-addressed store, hash-verified

17
18impl ChatMLHistory {
19 fn encode_message(message: &Message) -> String {
20 format!(
21 "<|im_start|>{}\n{}<|im_end|>",
22 message.role,
23 message.content.trim()
24 )
25 }
26
27 /// Create a new instance of this object.
28 pub fn new() -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected