Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed crates/openhuman-embed/src/profiles/handle.rs

Steven Enamakelef9dc700195d
diff --git a/crates/openhuman-embed/src/profiles/handle.rs b/crates/openhuman-embed/src/profiles/handle.rs
index 3e57e7697e..5376ccec9c 100644
--- a/crates/openhuman-embed/src/profiles/handle.rs
+++ b/crates/openhuman-embed/src/profiles/handle.rs
@@ -9,7 +9,6 @@ use openhuman_core::core::runtime::CoreContext;
use openhuman_core::profiles::Profile;
use openhuman_core::threads::{
ConversationMessagesRequest, ConversationMessagesResponse, ConversationThreadsListResponse,
- UpsertConversationThreadRequest,
};
use serde::de::DeserializeOwned;
use serde::{Deserialize, Serialize};
@@ -116,6 +115,15 @@ struct WebChatParams<'a> {
message: &'a str,
}
+/// `threads.upsert` params. The controller's schema lists only these three
+/// as required and refuses an explicit `null` for the optional ones.
+#[derive(Serialize)]
+struct UpsertThread<'a> {
+ id: &'a str,
+ title: &'a str,
+ created_at: String,
+}
+
#[derive(Deserialize)]
struct WebChatAccepted {
request_id: String,
@@ -290,13 +298,10 @@ impl ProfileHandle {
let _summary: ApiEnvelope<ConversationThreadSummary> = self
.call(
THREADS_UPSERT,
- UpsertConversationThreadRequest {
- id: thread_id.to_string(),
- title: thread_id.to_string(),
+ UpsertThread {
+ id: thread_id,
+ title: thread_id,
created_at: chrono::Utc::now().to_rfc3339(),
- parent_thread_id: None,
- labels: None,
- personality_id: None,
},
)
.await?;