mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-16 07:14:29 -04:00
chore: remove log input to avoid confusing (#1987)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@llamaindex/workflow": patch
|
||||
---
|
||||
|
||||
Improve agent workflow logging
|
||||
@@ -324,7 +324,9 @@ export class AgentWorkflow implements Workflow {
|
||||
} else {
|
||||
throw new Error("No user message or chat history provided");
|
||||
}
|
||||
|
||||
if (this.verbose) {
|
||||
console.log(`Starting agent ${this.rootAgentName}`);
|
||||
}
|
||||
return agentInputEvent.with({
|
||||
input: await memory.getMessages(),
|
||||
currentAgentName: this.rootAgentName,
|
||||
@@ -359,12 +361,6 @@ export class AgentWorkflow implements Workflow {
|
||||
throw new Error("No valid agent found");
|
||||
}
|
||||
|
||||
if (this.verbose) {
|
||||
console.log(
|
||||
`[Agent ${agent.name}]: Running for input: ${event.data.input[event.data.input.length - 1]?.content}`,
|
||||
);
|
||||
}
|
||||
|
||||
const output = await agent.takeStep(
|
||||
this.stateful.getContext(),
|
||||
this.stateful.getContext().state,
|
||||
@@ -519,6 +515,9 @@ export class AgentWorkflow implements Workflow {
|
||||
const messages = await this.stateful
|
||||
.getContext()
|
||||
.state.memory.getMessages();
|
||||
if (this.verbose) {
|
||||
console.log(`Starting agent ${nextAgentName}`);
|
||||
}
|
||||
return agentInputEvent.with({
|
||||
input: messages,
|
||||
currentAgentName: nextAgentName,
|
||||
|
||||
Reference in New Issue
Block a user