Skip to content

Commit

Permalink
fix: message created at wrong value (#1774)
Browse files Browse the repository at this point in the history
  • Loading branch information
namchuai authored Dec 8, 2024
1 parent 4700f8d commit e4c6a6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/services/message_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cpp::result<OpenAi::Message, std::string> MessageService::CreateMessage(
std::optional<Cortex::VariantMap> metadata) {
LOG_TRACE << "CreateMessage for thread " << thread_id;

auto seconds_since_epoch =
uint32_t seconds_since_epoch =
std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
.count();
Expand All @@ -33,7 +33,7 @@ cpp::result<OpenAi::Message, std::string> MessageService::CreateMessage(
OpenAi::Message msg;
msg.id = msg_id;
msg.object = "thread.message";
msg.created_at = 0;
msg.created_at = seconds_since_epoch;
msg.thread_id = thread_id;
msg.status = OpenAi::Status::COMPLETED;
msg.completed_at = seconds_since_epoch;
Expand Down

0 comments on commit e4c6a6f

Please sign in to comment.