mirror of
https://github.com/aljazceru/goose.git
synced 2026-02-09 16:44:24 +01:00
[goose-llm] use chrono utc timestamp milliseconds for msg created (#2483)
This commit is contained in:
@@ -286,7 +286,7 @@ impl Message {
|
||||
pub fn new(role: Role) -> Self {
|
||||
Self {
|
||||
role,
|
||||
created: Utc::now().timestamp(),
|
||||
created: Utc::now().timestamp_millis(),
|
||||
content: Contents::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ pub fn response_to_message(response: Value) -> anyhow::Result<Message> {
|
||||
|
||||
Ok(Message {
|
||||
role: Role::Assistant,
|
||||
created: chrono::Utc::now().timestamp(),
|
||||
created: chrono::Utc::now().timestamp_millis(),
|
||||
content: content.into(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ pub fn response_to_message(response: Value) -> anyhow::Result<Message> {
|
||||
|
||||
Ok(Message {
|
||||
role: Role::Assistant,
|
||||
created: chrono::Utc::now().timestamp(),
|
||||
created: chrono::Utc::now().timestamp_millis(),
|
||||
content: content.into(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user