mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-07-30 23:05:08 +00:00
community fixes
This commit is contained in:
@@ -68,6 +68,7 @@ fn append_tool_error_guidance(tool_result_blocks: &mut Vec<ContentBlock>) {
|
||||
if has_tool_error {
|
||||
tool_result_blocks.push(ContentBlock::Text {
|
||||
text: TOOL_ERROR_GUIDANCE.to_string(),
|
||||
provider_metadata: None,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2897,13 +2898,14 @@ mod tests {
|
||||
None, // hooks
|
||||
None, // context_window_tokens
|
||||
None, // process_manager
|
||||
None, // user_content_blocks
|
||||
)
|
||||
.await
|
||||
.expect("Loop should complete without error");
|
||||
|
||||
let guidance_seen = session.messages.iter().any(|msg| match &msg.content {
|
||||
MessageContent::Blocks(blocks) => blocks.iter().any(|block| {
|
||||
matches!(block, ContentBlock::Text { text } if text == TOOL_ERROR_GUIDANCE)
|
||||
matches!(block, ContentBlock::Text { text, .. } if text == TOOL_ERROR_GUIDANCE)
|
||||
}),
|
||||
_ => false,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user