mirror of
https://github.com/katanemo/plano.git
synced 2026-05-15 11:02:39 +02:00
update getting started guide and add llm gateway and prompt gateway samples (#330)
This commit is contained in:
parent
9d8fe02729
commit
a54db1a098
24 changed files with 1203 additions and 778 deletions
|
|
@ -179,8 +179,6 @@ impl Display for LlmProvider {
|
|||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Endpoint {
|
||||
pub endpoint: Option<String>,
|
||||
// pub connect_timeout: Option<DurationString>,
|
||||
// pub timeout: Option<DurationString>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
@ -193,12 +191,33 @@ pub struct Parameter {
|
|||
#[serde(rename = "enum")]
|
||||
pub enum_values: Option<Vec<String>>,
|
||||
pub default: Option<String>,
|
||||
pub in_path: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash, Default)]
|
||||
pub enum HttpMethod {
|
||||
#[default]
|
||||
#[serde(rename = "GET")]
|
||||
Get,
|
||||
#[serde(rename = "POST")]
|
||||
Post,
|
||||
}
|
||||
|
||||
impl Display for HttpMethod {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
HttpMethod::Get => write!(f, "GET"),
|
||||
HttpMethod::Post => write!(f, "POST"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue