Build the final system prompt, auto-detecting style from the initial message. If `self.style` is explicitly set, that style is used regardless of message content. Otherwise, the style is detected from `initial_message` using keyword analysis.
(&self, initial_message: &str)
| 462 | /// If `self.style` is explicitly set, that style is used regardless of message content. |
| 463 | /// Otherwise, the style is detected from `initial_message` using keyword analysis. |
| 464 | pub fn build_with_message(&self, initial_message: &str) -> String { |
| 465 | let style = self |
| 466 | .style |
| 467 | .unwrap_or_else(|| AgentStyle::detect_from_message(initial_message)); |
| 468 | self.build_with_style(style) |
| 469 | } |
| 470 | |
| 471 | /// Build the prompt with an explicitly specified style. |
| 472 | fn build_with_style(&self, style: AgentStyle) -> String { |