pub async fn prepare_request(
agent: &dyn Agent,
conversation: &[Message],
provider: &dyn AiProvider,
settings_manager: SettingsManager,
steering: &SteeringDocuments,
tools: Vec<Arc<dyn ToolExecutor>>,
prompt_builder: &PromptBuilder,
context_builder: &ContextBuilder,
modules: &[Arc<dyn Module>],
) -> Result<(ConversationRequest, ModelSettings)>Expand description
Prepare an AI conversation request. This handles the work of fully assembling a request - including building the prompt (from the agent and prompt_builder), the context message (from the context_builder), selecting the correct model, etc.