docs: add as_meta parameter for AI agents in content endpoints
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -257,7 +257,8 @@ pub async fn handle_post_item(
|
||||
path = "/api/item/latest/content",
|
||||
operation_id = "keep_get_item_latest_content",
|
||||
summary = "Download latest item content",
|
||||
description = "Get raw content of the most recent item. Filter by tags. Binary content can be restricted.",
|
||||
description = "Get raw content of the most recent item. Filter by tags. Binary content can be restricted. \
|
||||
AI agents should use as_meta=true to get content and metadata in a structured JSON format.",
|
||||
responses(
|
||||
(status = 200, description = "Content retrieved"),
|
||||
(status = 400, description = "Binary content not allowed"),
|
||||
@@ -270,7 +271,8 @@ pub async fn handle_post_item(
|
||||
("allow_binary" = Option<bool>, Query, description = "Allow binary content"),
|
||||
("offset" = Option<u64>, Query, description = "Byte offset to start reading"),
|
||||
("length" = Option<u64>, Query, description = "Number of bytes to read"),
|
||||
("stream" = Option<bool>, Query, description = "Stream response (true) or build in memory (false)")
|
||||
("stream" = Option<bool>, Query, description = "Stream response (true) or build in memory (false)"),
|
||||
("as_meta" = Option<bool>, Query, description = "Return content and metadata in JSON format (recommended for AI agents)")
|
||||
),
|
||||
security(
|
||||
("bearerAuth" = [])
|
||||
@@ -326,7 +328,8 @@ pub async fn handle_get_item_latest_content(
|
||||
path = "/api/item/{item_id}/content",
|
||||
operation_id = "keep_get_item_content",
|
||||
summary = "Download item content",
|
||||
description = "Get raw content of a specific item by ID. Binary content can be restricted.",
|
||||
description = "Get raw content of a specific item by ID. Binary content can be restricted. \
|
||||
AI agents should use as_meta=true to get content and metadata in a structured JSON format.",
|
||||
responses(
|
||||
(status = 200, description = "Content retrieved"),
|
||||
(status = 400, description = "Invalid ID or binary not allowed"),
|
||||
@@ -339,7 +342,8 @@ pub async fn handle_get_item_latest_content(
|
||||
("allow_binary" = Option<bool>, Query, description = "Allow binary content"),
|
||||
("offset" = Option<u64>, Query, description = "Byte offset to start reading"),
|
||||
("length" = Option<u64>, Query, description = "Number of bytes to read"),
|
||||
("stream" = Option<bool>, Query, description = "Stream response (true) or build in memory (false)")
|
||||
("stream" = Option<bool>, Query, description = "Stream response (true) or build in memory (false)"),
|
||||
("as_meta" = Option<bool>, Query, description = "Return content and metadata in JSON format (recommended for AI agents)")
|
||||
),
|
||||
security(
|
||||
("bearerAuth" = [])
|
||||
|
||||
Reference in New Issue
Block a user