mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
found one more place we were doing this
This commit is contained in:
@@ -749,11 +749,12 @@ async fn execute_job(
|
||||
job_def.current_session_id = Some(session.id.clone());
|
||||
}
|
||||
|
||||
let prompt_text = recipe
|
||||
.prompt
|
||||
.as_ref()
|
||||
.or(recipe.instructions.as_ref())
|
||||
.unwrap();
|
||||
let prompt_text = match (&recipe.instructions, &recipe.prompt) {
|
||||
(Some(instructions), Some(prompt)) => format!("{}\n\n{}", instructions, prompt),
|
||||
(Some(instructions), None) => instructions.clone(),
|
||||
(None, Some(prompt)) => prompt.clone(),
|
||||
(None, None) => panic!("Recipe has no instructions or prompt"),
|
||||
};
|
||||
|
||||
let user_message = Message::user().with_text(prompt_text);
|
||||
let mut conversation = Conversation::new_unvalidated(vec![user_message.clone()]);
|
||||
|
||||
Reference in New Issue
Block a user