diff options
Diffstat (limited to 'src/config/agent.rs')
| -rw-r--r-- | src/config/agent.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config/agent.rs b/src/config/agent.rs index e16e7a7..49d5835 100644 --- a/src/config/agent.rs +++ b/src/config/agent.rs @@ -66,7 +66,7 @@ impl Agent { let rag = if rag_path.exists() { Some(Arc::new(Rag::load(config, DEFAULT_AGENT_NAME, &rag_path)?)) - } else if !definition.documents.is_empty() { + } else if !definition.documents.is_empty() && !config.read().print_info_only { let mut ans = false; if *IS_STDOUT_TERMINAL { ans = Confirm::new("The agent has the documents, init RAG?") @@ -109,6 +109,7 @@ impl Agent { pub fn init_agent_variables( agent_variables: &[AgentVariable], variables: &IndexMap<String, String>, + no_interaction: bool, ) -> Result<IndexMap<String, String>> { let mut output = IndexMap::new(); if agent_variables.is_empty() { @@ -127,6 +128,9 @@ impl Agent { output.insert(key, value); continue; } + if no_interaction { + continue; + } if *IS_STDOUT_TERMINAL { if !printed { println!("⚙ Init agent variables..."); |
