Skip to content

Commit

Permalink
fix: do not remove empty messages for anthropic generator
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Dec 5, 2024
1 parent 59a4f2a commit 1a5fd9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/agent/generator/anthropic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ impl Client for AnthropicClient {
super::Message::Feedback(data, _) => {
let trimmed = data.trim();
if !trimmed.is_empty() {
messages.push(Message::user(data.trim()))
messages.push(Message::user(trimmed))
} else {
log::warn!("ignoring empty user message: {:?}", m);
messages.push(Message::user("no output".to_string()))
}
}
}
Expand Down

0 comments on commit 1a5fd9e

Please sign in to comment.