20 lines
548 B
Rust
20 lines
548 B
Rust
use rtx_llm_tools::reasoning::{ChainOfThought, Evidence, ReasoningStep};
|
|
|
|
#[tokio::test]
|
|
async fn test_simple_reasoning_chain() {
|
|
let mut chain = ChainOfThought::new("basic_test");
|
|
|
|
let step1 = ReasoningStep::new(
|
|
"step1",
|
|
"All humans are mortal",
|
|
vec![Evidence::new("premise", "Universal truth")],
|
|
"Mortality applies to all humans",
|
|
);
|
|
|
|
chain.add_step(step1).await.unwrap();
|
|
|
|
let result = chain.execute().await.unwrap();
|
|
assert!(result.is_valid);
|
|
assert_eq!(result.steps_executed, 1);
|
|
}
|