add msg id to search endpoint response [LET-6582] (#7236)
* add msg id to search endpoint response * rename
This commit is contained in:
committed by
Caren Thomas
parent
9c1c2698ab
commit
f929d53cfe
@@ -21952,6 +21952,11 @@
|
||||
"title": "Content",
|
||||
"description": "The message content sent by the assistant (can be a string or an array of content parts)"
|
||||
},
|
||||
"message_id": {
|
||||
"type": "string",
|
||||
"title": "Message Id",
|
||||
"description": "The unique identifier of the message."
|
||||
},
|
||||
"agent_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -21972,9 +21977,9 @@
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": ["content", "created_at"],
|
||||
"required": ["content", "message_id", "created_at"],
|
||||
"title": "AssistantMessageListResult",
|
||||
"description": "Assistant message list result with agent context.\n\nShape is identical to UpdateAssistantMessage but includes the owning agent_id."
|
||||
"description": "Assistant message list result with agent context.\n\nShape is identical to UpdateAssistantMessage but includes the owning agent_id and message id."
|
||||
},
|
||||
"Audio": {
|
||||
"properties": {
|
||||
@@ -34376,6 +34381,11 @@
|
||||
"title": "Message Type",
|
||||
"default": "reasoning_message"
|
||||
},
|
||||
"message_id": {
|
||||
"type": "string",
|
||||
"title": "Message Id",
|
||||
"description": "The unique identifier of the message."
|
||||
},
|
||||
"agent_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -34396,9 +34406,9 @@
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": ["reasoning", "created_at"],
|
||||
"required": ["reasoning", "message_id", "created_at"],
|
||||
"title": "ReasoningMessageListResult",
|
||||
"description": "Reasoning message list result with agent context.\n\nShape is identical to UpdateReasoningMessage but includes the owning agent_id."
|
||||
"description": "Reasoning message list result with agent context.\n\nShape is identical to UpdateReasoningMessage but includes the owning agent_id and message id."
|
||||
},
|
||||
"RedactedReasoningContent": {
|
||||
"properties": {
|
||||
@@ -36870,6 +36880,11 @@
|
||||
"title": "Content",
|
||||
"description": "The message content sent by the system (can be a string or an array of multi-modal content parts)"
|
||||
},
|
||||
"message_id": {
|
||||
"type": "string",
|
||||
"title": "Message Id",
|
||||
"description": "The unique identifier of the message."
|
||||
},
|
||||
"agent_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -36890,9 +36905,9 @@
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": ["content", "created_at"],
|
||||
"required": ["content", "message_id", "created_at"],
|
||||
"title": "SystemMessageListResult",
|
||||
"description": "System message list result with agent context.\n\nShape is identical to UpdateSystemMessage but includes the owning agent_id."
|
||||
"description": "System message list result with agent context.\n\nShape is identical to UpdateSystemMessage but includes the owning agent_id and message id."
|
||||
},
|
||||
"TagSchema": {
|
||||
"properties": {
|
||||
@@ -39541,6 +39556,11 @@
|
||||
"title": "Content",
|
||||
"description": "The message content sent by the user (can be a string or an array of multi-modal content parts)"
|
||||
},
|
||||
"message_id": {
|
||||
"type": "string",
|
||||
"title": "Message Id",
|
||||
"description": "The unique identifier of the message."
|
||||
},
|
||||
"agent_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -39561,9 +39581,9 @@
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": ["content", "created_at"],
|
||||
"required": ["content", "message_id", "created_at"],
|
||||
"title": "UserMessageListResult",
|
||||
"description": "User message list result with agent context.\n\nShape is identical to UpdateUserMessage but includes the owning agent_id."
|
||||
"description": "User message list result with agent context.\n\nShape is identical to UpdateUserMessage but includes the owning agent_id and message id."
|
||||
},
|
||||
"UserUpdate": {
|
||||
"properties": {
|
||||
|
||||
@@ -563,9 +563,13 @@ LettaMessageUpdateUnion = Annotated[
|
||||
class SystemMessageListResult(UpdateSystemMessage):
|
||||
"""System message list result with agent context.
|
||||
|
||||
Shape is identical to UpdateSystemMessage but includes the owning agent_id.
|
||||
Shape is identical to UpdateSystemMessage but includes the owning agent_id and message id.
|
||||
"""
|
||||
|
||||
message_id: str = Field(
|
||||
...,
|
||||
description="The unique identifier of the message.",
|
||||
)
|
||||
agent_id: str | None = Field(
|
||||
default=None,
|
||||
description="The unique identifier of the agent that owns the message.",
|
||||
@@ -577,9 +581,13 @@ class SystemMessageListResult(UpdateSystemMessage):
|
||||
class UserMessageListResult(UpdateUserMessage):
|
||||
"""User message list result with agent context.
|
||||
|
||||
Shape is identical to UpdateUserMessage but includes the owning agent_id.
|
||||
Shape is identical to UpdateUserMessage but includes the owning agent_id and message id.
|
||||
"""
|
||||
|
||||
message_id: str = Field(
|
||||
...,
|
||||
description="The unique identifier of the message.",
|
||||
)
|
||||
agent_id: str | None = Field(
|
||||
default=None,
|
||||
description="The unique identifier of the agent that owns the message.",
|
||||
@@ -591,9 +599,13 @@ class UserMessageListResult(UpdateUserMessage):
|
||||
class ReasoningMessageListResult(UpdateReasoningMessage):
|
||||
"""Reasoning message list result with agent context.
|
||||
|
||||
Shape is identical to UpdateReasoningMessage but includes the owning agent_id.
|
||||
Shape is identical to UpdateReasoningMessage but includes the owning agent_id and message id.
|
||||
"""
|
||||
|
||||
message_id: str = Field(
|
||||
...,
|
||||
description="The unique identifier of the message.",
|
||||
)
|
||||
agent_id: str | None = Field(
|
||||
default=None,
|
||||
description="The unique identifier of the agent that owns the message.",
|
||||
@@ -605,9 +617,13 @@ class ReasoningMessageListResult(UpdateReasoningMessage):
|
||||
class AssistantMessageListResult(UpdateAssistantMessage):
|
||||
"""Assistant message list result with agent context.
|
||||
|
||||
Shape is identical to UpdateAssistantMessage but includes the owning agent_id.
|
||||
Shape is identical to UpdateAssistantMessage but includes the owning agent_id and message id.
|
||||
"""
|
||||
|
||||
message_id: str = Field(
|
||||
...,
|
||||
description="The unique identifier of the message.",
|
||||
)
|
||||
agent_id: str | None = Field(
|
||||
default=None,
|
||||
description="The unique identifier of the agent that owns the message.",
|
||||
|
||||
@@ -360,6 +360,7 @@ class Message(BaseMessage):
|
||||
if isinstance(lm, SystemMessage):
|
||||
letta_search_results.append(
|
||||
SystemMessageListResult(
|
||||
message_id=message.id,
|
||||
message_type=lm.message_type,
|
||||
content=lm.content,
|
||||
agent_id=message.agent_id,
|
||||
@@ -369,6 +370,7 @@ class Message(BaseMessage):
|
||||
elif isinstance(lm, UserMessage):
|
||||
letta_search_results.append(
|
||||
UserMessageListResult(
|
||||
message_id=message.id,
|
||||
message_type=lm.message_type,
|
||||
content=lm.content,
|
||||
agent_id=message.agent_id,
|
||||
@@ -378,6 +380,7 @@ class Message(BaseMessage):
|
||||
elif isinstance(lm, ReasoningMessage):
|
||||
letta_search_results.append(
|
||||
ReasoningMessageListResult(
|
||||
message_id=message.id,
|
||||
message_type=lm.message_type,
|
||||
reasoning=lm.reasoning,
|
||||
agent_id=message.agent_id,
|
||||
@@ -387,6 +390,7 @@ class Message(BaseMessage):
|
||||
elif isinstance(lm, AssistantMessage):
|
||||
letta_search_results.append(
|
||||
AssistantMessageListResult(
|
||||
message_id=message.id,
|
||||
message_type=lm.message_type,
|
||||
content=lm.content,
|
||||
agent_id=message.agent_id,
|
||||
|
||||
Reference in New Issue
Block a user