Add LLM system prompt override
Allow overriding the LLM system prompt via the `LLM_SYSTEM_PROMPT` environment variable. This provides flexibility for customizing LLM behavior without code changes. A default prompt is used if the environment variable is unset or empty.
This commit is contained in:
@@ -48,6 +48,17 @@ async fn main() {
|
||||
);
|
||||
}
|
||||
|
||||
{
|
||||
let custom = std::env::var("LLM_SYSTEM_PROMPT")
|
||||
.map(|v| !v.is_empty())
|
||||
.unwrap_or(false);
|
||||
info!(
|
||||
prompt_source = if custom { "env" } else { "default" },
|
||||
prompt_chars = config.llm_system_prompt.chars().count(),
|
||||
"system prompt loaded"
|
||||
);
|
||||
}
|
||||
|
||||
// Shared HTTP client for both downstream pipelines.
|
||||
let http_client = reqwest::Client::builder()
|
||||
.build()
|
||||
|
||||
Reference in New Issue
Block a user