File size: 651 Bytes
82bf89e |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import streamlit as st
import json
# Function to display tool execution details
def display_tool_executions():
if st.session_state.tool_executions:
with st.expander("Tool Execution History", expanded=False):
for i, exec_record in enumerate(st.session_state.tool_executions):
st.markdown(f"### Execution #{i+1}: `{exec_record['tool_name']}`")
st.markdown(f"**Input:** ```json{json.dumps(exec_record['input'])}```")
st.markdown(f"**Output:** ```{exec_record['output'][:250]}...```")
st.markdown(f"**Time:** {exec_record['timestamp']}")
st.divider() |