36 lines
744 B
Rust
36 lines
744 B
Rust
|
|
use serde::Deserialize;
|
||
|
|
|
||
|
|
#[derive(Deserialize)]
|
||
|
|
pub(crate) struct ChatLogprobs {
|
||
|
|
pub(crate) content: Vec<TokenLogprob>,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Deserialize)]
|
||
|
|
pub(crate) struct TokenLogprob {
|
||
|
|
pub(crate) top_logprobs: Vec<TopLogprob>,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Deserialize)]
|
||
|
|
pub(crate) struct TopLogprob {
|
||
|
|
pub(crate) token: String,
|
||
|
|
pub(crate) logprob: f64,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Deserialize)]
|
||
|
|
pub(crate) struct Prompts {
|
||
|
|
pub(crate) shieldstral: ShieldstralPrompts,
|
||
|
|
pub(crate) gemma: GemmaPrompts,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Deserialize)]
|
||
|
|
pub(crate) struct ShieldstralPrompts {
|
||
|
|
pub(crate) system: String,
|
||
|
|
pub(crate) prompt_template: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Deserialize)]
|
||
|
|
pub(crate) struct GemmaPrompts {
|
||
|
|
pub(crate) preamble: String,
|
||
|
|
pub(crate) prompt: String,
|
||
|
|
}
|