Log effective tool list, not just whitelist
Shows the actual tool names each agent will receive after whitelist filtering, so logs are accurate regardless of whether tools is empty (all) or specified. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
8eabeab8eb
commit
916f14a092
1 changed files with 8 additions and 3 deletions
|
|
@ -294,11 +294,16 @@ fn run_one_agent_inner(
|
||||||
_llm_tag: &str,
|
_llm_tag: &str,
|
||||||
log: &(dyn Fn(&str) + Sync),
|
log: &(dyn Fn(&str) + Sync),
|
||||||
) -> Result<AgentResult, String> {
|
) -> Result<AgentResult, String> {
|
||||||
let tools_desc = if def.tools.is_empty() {
|
let all_tools = crate::thought::memory_and_journal_definitions();
|
||||||
"all tools".into()
|
let effective_tools: Vec<String> = if def.tools.is_empty() {
|
||||||
|
all_tools.iter().map(|t| t.function.name.clone()).collect()
|
||||||
} else {
|
} else {
|
||||||
def.tools.join(", ")
|
all_tools.iter()
|
||||||
|
.filter(|t| def.tools.iter().any(|w| w == &t.function.name))
|
||||||
|
.map(|t| t.function.name.clone())
|
||||||
|
.collect()
|
||||||
};
|
};
|
||||||
|
let tools_desc = effective_tools.join(", ");
|
||||||
let n_steps = agent_batch.steps.len();
|
let n_steps = agent_batch.steps.len();
|
||||||
|
|
||||||
for key in &agent_batch.node_keys {
|
for key in &agent_batch.node_keys {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue