feat: Separate out streaming route (#2111)

This commit is contained in:
Matthew Zhou
2024-11-27 14:03:46 -08:00
committed by GitHub
parent cfb48a112f
commit 5a59d2ac42
16 changed files with 301 additions and 411 deletions

View File

@@ -7,7 +7,6 @@ from pydantic import BaseModel, Field
from letta.schemas.enums import MessageStreamStatus
from letta.schemas.letta_message import LettaMessage, LettaMessageUnion
from letta.schemas.message import Message
from letta.schemas.usage import LettaUsageStatistics
from letta.utils import json_dumps
@@ -24,7 +23,7 @@ class LettaResponse(BaseModel):
usage (LettaUsageStatistics): The usage statistics
"""
messages: Union[List[Message], List[LettaMessageUnion]] = Field(..., description="The messages returned by the agent.")
messages: List[LettaMessageUnion] = Field(..., description="The messages returned by the agent.")
usage: LettaUsageStatistics = Field(..., description="The usage statistics of the agent.")
def __str__(self):