Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

refactor: rename `stream` to `streaming` in ConversationMessageRequest (#9063)

github-actions[bot]194c7432238b
diff --git a/fern/openapi.json b/fern/openapi.json
index d52bcaf6f..d4b965de7 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -30043,28 +30043,28 @@
"title": "Override Model",
"description": "Model handle to use for this request instead of the agent's default model. This allows sending a message to a different model without changing the agent's configuration."
},
- "stream": {
+ "streaming": {
"type": "boolean",
- "title": "Stream",
+ "title": "Streaming",
"description": "If True (default), returns a streaming response (Server-Sent Events). If False, returns a complete JSON response.",
"default": true
},
"stream_tokens": {
"type": "boolean",
"title": "Stream Tokens",
- "description": "Flag to determine if individual tokens should be streamed, rather than streaming per step (only used when stream=true).",
+ "description": "Flag to determine if individual tokens should be streamed, rather than streaming per step (only used when streaming=true).",
"default": false
},
"include_pings": {
"type": "boolean",
"title": "Include Pings",
- "description": "Whether to include periodic keepalive ping messages in the stream to prevent connection timeouts (only used when stream=true).",
+ "description": "Whether to include periodic keepalive ping messages in the stream to prevent connection timeouts (only used when streaming=true).",
"default": true
},
"background": {
"type": "boolean",
"title": "Background",
- "description": "Whether to process the request in the background (only used when stream=true).",
+ "description": "Whether to process the request in the background (only used when streaming=true).",
"default": false
}
},
diff --git a/letta/schemas/letta_request.py b/letta/schemas/letta_request.py
index ba261e161..8bc74addd 100644
--- a/letta/schemas/letta_request.py
+++ b/letta/schemas/letta_request.py
@@ -128,21 +128,21 @@ class LettaStreamingRequest(LettaRequest):
class ConversationMessageRequest(LettaRequest):
"""Request for sending messages to a conversation. Streams by default."""
- stream: bool = Field(
+ streaming: bool = Field(
default=True,
description="If True (default), returns a streaming response (Server-Sent Events). If False, returns a complete JSON response.",
)
stream_tokens: bool = Field(
default=False,
- description="Flag to determine if individual tokens should be streamed, rather than streaming per step (only used when stream=true).",
+ description="Flag to determine if individual tokens should be streamed, rather than streaming per step (only used when streaming=true).",
)
include_pings: bool = Field(
default=True,
- description="Whether to include periodic keepalive ping messages in the stream to prevent connection timeouts (only used when stream=true).",
+ description="Whether to include periodic keepalive ping messages in the stream to prevent connection timeouts (only used when streaming=true).",
)
background: bool = Field(
default=False,
- description="Whether to process the request in the background (only used when stream=true).",
+ description="Whether to process the request in the background (only used when streaming=true).",
)
diff --git a/letta/server/rest_api/routers/v1/conversations.py b/letta/server/rest_api/routers/v1/conversations.py
index 40951247a..212fcd32a 100644
--- a/letta/server/rest_api/routers/v1/conversations.py
+++ b/letta/server/rest_api/routers/v1/conversations.py
@@ -161,8 +161,8 @@ async def list_conversation_messages(
200: {
"description": "Successful response",
"content": {
- "text/event-stream": {"description": "Server-Sent Events stream (default, when stream=true)"},
- "application/json": {"description": "JSON response (when stream=false)"},
+ "text/event-stream": {"description": "Server-Sent Events stream (default, when streaming=true)"},
+ "application/json": {"description": "JSON response (when streaming=false)"},
},
}
},
@@ -177,8 +177,8 @@ async def send_conversation_message(
Send a message to a conversation and get a response.
This endpoint sends a message to an existing conversation.
- By default (stream=true), returns a streaming response (Server-Sent Events).
- Set stream=false to get a complete JSON response.
+ By default (streaming=true), returns a streaming response (Server-Sent Events).
+ Set streaming=false to get a complete JSON response.
"""
actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)
@@ -191,7 +191,7 @@ async def send_conversation_message(
)
# Streaming mode (default)
- if request.stream:
+ if request.streaming:
# Convert to LettaStreamingRequest for StreamingService compatibility
streaming_request = LettaStreamingRequest(
messages=request.messages,