mirror of
https://github.com/katanemo/plano.git
synced 2026-06-26 15:39:40 +02:00
wip
Signed-off-by: José Ulises Niño Rivera <junr03@users.noreply.github.com>
This commit is contained in:
parent
d38246ceaf
commit
7c4dde5d1f
6 changed files with 11 additions and 251 deletions
|
|
@ -25,7 +25,6 @@ pub struct StoreVectorEmbeddingsRequest {
|
|||
pub points: Vec<VectorPoint>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct SearchPointResult {
|
||||
pub id: String,
|
||||
|
|
@ -121,9 +120,9 @@ pub mod open_ai {
|
|||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct ChatCompletionsResponse {
|
||||
pub usage: Usage,
|
||||
pub usage: Option<Usage>,
|
||||
pub choices: Vec<Choice>,
|
||||
pub model: String
|
||||
pub model: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
@ -172,7 +171,7 @@ pub enum PromptGuardTask {
|
|||
#[serde(rename = "toxicity")]
|
||||
Toxicity,
|
||||
#[serde(rename = "both")]
|
||||
Both
|
||||
Both,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
@ -187,4 +186,4 @@ pub struct PromptGuardResponse {
|
|||
pub jailbreak_prob: Option<f64>,
|
||||
pub toxic_verdict: Option<bool>,
|
||||
pub jailbreak_verdict: Option<bool>,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,13 +71,6 @@ pub enum LoadBalancing {
|
|||
Random,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
//TODO: use enum for model, but if there is a new model, we need to update the code
|
||||
pub struct EmbeddingProviver {
|
||||
pub name: String,
|
||||
pub model: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
//TODO: use enum for model, but if there is a new model, we need to update the code
|
||||
pub struct LlmProvider {
|
||||
|
|
@ -193,4 +186,4 @@ ratelimits:
|
|||
let c: super::Configuration = serde_yaml::from_str(CONFIGURATION).unwrap();
|
||||
assert_eq!(c.prompt_guards.unwrap().input_guard.len(), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue