mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
pretty_eq
This commit is contained in:
parent
e218f875d7
commit
ffe6193a6e
3 changed files with 5 additions and 0 deletions
1
crates/Cargo.lock
generated
1
crates/Cargo.lock
generated
|
|
@ -1120,6 +1120,7 @@ dependencies = [
|
|||
"http",
|
||||
"log",
|
||||
"md5",
|
||||
"pretty_assertions",
|
||||
"proxy-wasm",
|
||||
"proxy-wasm-test-framework",
|
||||
"rand",
|
||||
|
|
|
|||
|
|
@ -26,3 +26,4 @@ sha2 = "0.10.8"
|
|||
[dev-dependencies]
|
||||
proxy-wasm-test-framework = { git = "https://github.com/katanemo/test-framework.git", branch = "new" }
|
||||
serial_test = "3.1.1"
|
||||
pretty_assertions = "1.4.1"
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ pub fn extract_messages_for_hallucination(messages: &Vec<Message>) -> Vec<String
|
|||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use pretty_assertions::assert_eq;
|
||||
use common::common_types::open_ai::Message;
|
||||
|
||||
use super::extract_messages_for_hallucination;
|
||||
|
|
@ -157,5 +158,7 @@ mod test {
|
|||
let messages_for_halluncination = extract_messages_for_hallucination(&messages);
|
||||
println!("{:?}", messages_for_halluncination);
|
||||
assert_eq!(messages_for_halluncination.len(), 3);
|
||||
assert_eq!(["tell me about the weather", "Seattle", "7 days"], messages_for_halluncination.as_slice());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue