use llm_chain::{executor, parameters, prompt, step::Step}; #[tokio::main(flavor = "current_thread")] async fn main() -> Result<(), Box> { // Create a new ChatGPT executor let exec = executor!()?; // Create our step containing our prompt template let step = Step::for_prompt_template(prompt!( "You are a bot for making personalized greetings", "Make a personalized greeting tweet for {{text}}" // Text is the default parameter name, but you can use whatever you want )); // A greeting for emil! let res = step.run(¶meters!("Emil"), &exec).await?; println!("{}", res.to_immediate().await?.as_content()); // A greeting for you let res = step.run(¶meters!("Your Name Here"), &exec).await?; println!("{}", res.to_immediate().await?.as_content()); Ok(()) }