mirror of
https://github.com/katanemo/plano.git
synced 2026-06-26 15:39:40 +02:00
move method to endpoint section and use Agent AI app name
This commit is contained in:
parent
c40a6d66c8
commit
428227d98e
11 changed files with 36 additions and 32 deletions
|
|
@ -194,12 +194,6 @@ pub struct Parameter {
|
|||
pub in_path: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct EndpointDetails {
|
||||
pub name: String,
|
||||
pub path: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash, Default)]
|
||||
pub enum HttpMethod {
|
||||
#[default]
|
||||
|
|
@ -218,13 +212,19 @@ impl Display for HttpMethod {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct EndpointDetails {
|
||||
pub name: String,
|
||||
pub path: Option<String>,
|
||||
#[serde(rename = "http_method")]
|
||||
pub method: Option<HttpMethod>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct PromptTarget {
|
||||
pub name: String,
|
||||
pub default: Option<bool>,
|
||||
pub description: String,
|
||||
#[serde(rename = "http_method")]
|
||||
pub method: Option<HttpMethod>,
|
||||
pub endpoint: Option<EndpointDetails>,
|
||||
pub parameters: Option<Vec<Parameter>>,
|
||||
pub system_prompt: Option<String>,
|
||||
|
|
|
|||
|
|
@ -920,7 +920,7 @@ impl StreamContext {
|
|||
}
|
||||
};
|
||||
|
||||
let http_method = prompt_target.method.unwrap_or_default().to_string();
|
||||
let http_method = endpoint.method.unwrap_or_default().to_string();
|
||||
let mut headers = vec![
|
||||
(ARCH_UPSTREAM_HOST_HEADER, endpoint.name.as_str()),
|
||||
(":method", &http_method),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue