use crate::dto::InputKind; const DEFAULT_TASK: &str = "Given a web search query, retrieve relevant passages that answer the query"; /// Wrap text with the appropriate instruction prefix for the given input kind. /// /// - `Document` -> text unchanged /// - `Query` -> `"Instruct: \nQuery: "` pub fn wrap(text: &str, kind: InputKind) -> String { match kind { InputKind::Document => text.to_string(), InputKind::Query => format!("Instruct: {DEFAULT_TASK}\nQuery: {text}"), } }