From f19ddd6893e1ddcbcbac0dacb75e67848ba0d020 Mon Sep 17 00:00:00 2001 From: Seo DongPil Date: Wed, 15 Nov 2023 11:38:17 +0900 Subject: [PATCH] fix example code in readme --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a9f459b..537c08c 100644 --- a/README.md +++ b/README.md @@ -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"));