feat: add stream option to content API routes

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-28 17:26:22 -03:00
parent 3d4ed341e7
commit 79179cc465
2 changed files with 6 additions and 2 deletions

View File

@@ -155,7 +155,8 @@ pub async fn handle_post_item(
("tags" = Option<String>, Query, description = "Tags to filter latest item"), ("tags" = Option<String>, Query, description = "Tags to filter latest item"),
("allow_binary" = Option<bool>, Query, description = "Allow binary content"), ("allow_binary" = Option<bool>, Query, description = "Allow binary content"),
("offset" = Option<u64>, Query, description = "Byte offset to start reading"), ("offset" = Option<u64>, Query, description = "Byte offset to start reading"),
("length" = Option<u64>, Query, description = "Number of bytes to read") ("length" = Option<u64>, Query, description = "Number of bytes to read"),
("stream" = Option<bool>, Query, description = "Stream response (true) or build in memory (false)")
), ),
security( security(
("bearerAuth" = []) ("bearerAuth" = [])
@@ -217,7 +218,8 @@ pub async fn handle_get_item_latest_content(
("item_id" = i64, Path, description = "Item ID"), ("item_id" = i64, Path, description = "Item ID"),
("allow_binary" = Option<bool>, Query, description = "Allow binary content"), ("allow_binary" = Option<bool>, Query, description = "Allow binary content"),
("offset" = Option<u64>, Query, description = "Byte offset to start reading"), ("offset" = Option<u64>, Query, description = "Byte offset to start reading"),
("length" = Option<u64>, Query, description = "Number of bytes to read") ("length" = Option<u64>, Query, description = "Number of bytes to read"),
("stream" = Option<bool>, Query, description = "Stream response (true) or build in memory (false)")
), ),
security( security(
("bearerAuth" = []) ("bearerAuth" = [])

View File

@@ -40,6 +40,8 @@ use utoipa_swagger_ui::SwaggerUi;
crate::modes::server::common::MetadataResponse, crate::modes::server::common::MetadataResponse,
crate::modes::server::common::StatusInfoResponse, crate::modes::server::common::StatusInfoResponse,
crate::common::status::StatusInfo, crate::common::status::StatusInfo,
crate::modes::server::common::ItemQuery,
crate::modes::server::common::ItemContentQuery,
) )
), ),
tags( tags(