feat: add as_meta parameter to content endpoint
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -130,6 +130,8 @@ pub struct ItemQuery {
|
||||
pub length: u64,
|
||||
#[serde(default = "default_stream")]
|
||||
pub stream: bool,
|
||||
#[serde(default = "default_as_meta")]
|
||||
pub as_meta: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, utoipa::ToSchema)]
|
||||
@@ -143,6 +145,8 @@ pub struct ItemContentQuery {
|
||||
pub length: u64,
|
||||
#[serde(default = "default_stream")]
|
||||
pub stream: bool,
|
||||
#[serde(default = "default_as_meta")]
|
||||
pub as_meta: bool,
|
||||
}
|
||||
|
||||
fn check_bearer_auth(auth_str: &str, expected_password: &str, expected_hash: &Option<String>) -> bool {
|
||||
@@ -169,6 +173,10 @@ fn default_stream() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn default_as_meta() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn check_basic_auth(auth_str: &str, expected_password: &str, expected_hash: &Option<String>) -> bool {
|
||||
if !auth_str.starts_with("Basic ") {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user