Skip to content

Commit

Permalink
Merge pull request #15 from dongpil/fix/readme
Browse files Browse the repository at this point in the history
fix example code in readme
  • Loading branch information
santiagomed authored Nov 15, 2023
2 parents 7190cf5 + f19ddd6 commit 260ec14
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ async fn main() -> anyhow::Result<()> {
{{/user}}
{{/chat}}
"#;
let mut pipeline = LLMPipeline::new(&client).with_template("capitals", prompt);
pipeline
let pipeline = LLMPipeline::new(&client)
.load_template("capitals", prompt)?
.load_context(&Context::new(Data {
country1: "France".to_string(),
country2: "Germany".to_string(),
})?)
.await;
})?)?;
let res = pipeline.execute("capitals").await?.content();

assert!(res.contains("Berlin") || res.contains("berlin"));
Expand Down

0 comments on commit 260ec14

Please sign in to comment.