mirror of
https://github.com/katanemo/plano.git
synced 2026-05-08 07:12:42 +02:00
add history of messages
This commit is contained in:
parent
1dba11bfd9
commit
60cadf3e8a
3 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
pub const DEFAULT_EMBEDDING_MODEL: &str = "katanemo/bge-large-en-v1.5";
|
pub const DEFAULT_EMBEDDING_MODEL: &str = "katanemo/bge-large-en-v1.5";
|
||||||
pub const DEFAULT_INTENT_MODEL: &str = "katanemo/bart-large-mnli";
|
pub const DEFAULT_INTENT_MODEL: &str = "katanemo/bart-large-mnli";
|
||||||
pub const DEFAULT_PROMPT_TARGET_THRESHOLD: f64 = 0.8;
|
pub const DEFAULT_PROMPT_TARGET_THRESHOLD: f64 = 0.8;
|
||||||
pub const DEFAULT_HALLUCINATED_THRESHOLD: f64 = 0.1;
|
pub const DEFAULT_HALLUCINATED_THRESHOLD: f64 = 0.25;
|
||||||
pub const RATELIMIT_SELECTOR_HEADER_KEY: &str = "x-arch-ratelimit-selector";
|
pub const RATELIMIT_SELECTOR_HEADER_KEY: &str = "x-arch-ratelimit-selector";
|
||||||
pub const SYSTEM_ROLE: &str = "system";
|
pub const SYSTEM_ROLE: &str = "system";
|
||||||
pub const USER_ROLE: &str = "user";
|
pub const USER_ROLE: &str = "user";
|
||||||
|
|
|
||||||
|
|
@ -756,7 +756,8 @@ impl StreamContext {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
user_messages = callout_context.user_message.as_ref().unwrap().clone();
|
user_messages = callout_context.user_message.as_ref().unwrap().clone();
|
||||||
}
|
}
|
||||||
info!("user messages: {}", user_messages);
|
info!("user messages: {}", user_messages);
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ async def hallucination(req: HallucinationRequest, res: Response):
|
||||||
"""
|
"""
|
||||||
Take input as text and return the prediction of hallucination for each parameter
|
Take input as text and return the prediction of hallucination for each parameter
|
||||||
"""
|
"""
|
||||||
|
logger.info(f"hallucination request: {req}")
|
||||||
if req.model != zero_shot_model["model_name"]:
|
if req.model != zero_shot_model["model_name"]:
|
||||||
raise HTTPException(status_code=400, detail="unknown model: " + req.model)
|
raise HTTPException(status_code=400, detail="unknown model: " + req.model)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue