Allow for prompt caching to work by using baibot_conversation_start_time_utc instead of baibot_now_utc
This patch introduces a new `baibot_conversation_start_time_utc` variable which indicates the time the conversation got started. Using `baibot_now_utc` is still possible, but given that the current time is a moving target, its use is in conflict with prompt caching. Because the new `baibot_conversation_start_time_utc` prompt variable is a more reasonable default, we're now using it in all sample configs.
This commit is contained in:
@@ -72,6 +72,7 @@ impl ControllerTrait for Controller {
|
||||
let messages = vec![LLMMessage {
|
||||
author: LLMAuthor::User,
|
||||
message_text: "Hello!".to_string(),
|
||||
timestamp: chrono::Utc::now(),
|
||||
}];
|
||||
|
||||
let conversation = LLMConversation { messages };
|
||||
@@ -108,6 +109,7 @@ impl ControllerTrait for Controller {
|
||||
Some(LLMMessage {
|
||||
author: LLMAuthor::Prompt,
|
||||
message_text: prompt_text,
|
||||
timestamp: chrono::Utc::now(),
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user