Skip to content

Commit ae5d6c2

Browse files
Merge pull request #264 from askui/chore/log_and_reporter
improve interpretability of log and html output
2 parents 107dc93 + 664fe71 commit ae5d6c2

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/askui/models/shared/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,11 @@ def _run_regular_tool(
651651
raise
652652
except Exception as e: # noqa: BLE001
653653
error_message = getattr(e, "message", str(e))
654-
logger.warning(
654+
logger.info(
655655
"Tool failed",
656656
extra={"tool_name": tool_use_block_param.name, "error": error_message},
657657
)
658-
logger.warning("%s - %s", tool_use_block_param.name, error_message)
658+
logger.info("%s - %s", tool_use_block_param.name, error_message)
659659
return ToolResultBlockParam(
660660
content=f"Tool raised an unexpected error: {error_message}",
661661
is_error=True,

src/askui/reporting.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,8 +1009,11 @@ def generate(self) -> None:
10091009
Conversation #{{ conversation_usage.conversation_index }}
10101010
</span>
10111011
<span class="usage-breakdown-meta">
1012+
{{ conversation_usage.step_summaries | length }} step(s),
10121013
Input {{ "{:,}".format(conversation_usage.input_tokens or 0) }},
1013-
Output {{ "{:,}".format(conversation_usage.output_tokens or 0) }}
1014+
Output {{ "{:,}".format(conversation_usage.output_tokens or 0) }},
1015+
Cache Create {{ "{:,}".format(conversation_usage.cache_creation_input_tokens or 0) }},
1016+
Cache Read {{ "{:,}".format(conversation_usage.cache_read_input_tokens or 0) }}
10141017
{% if conversation_usage.total_cost is not none and conversation_usage.total_cost > 0 %}
10151018
, Cost:
10161019
${{ "%.6f"|format(conversation_usage.total_cost) }}

0 commit comments

Comments
 (0)