class_docstr: Encapsulates the Streamlit UI for a single LLM 'thought' during a LangChain Agent
  run. Each tool usage gets its own thought; and runs also generally having a
  concluding thought where the Agent determines that it has an answer to the prompt.
  
  Each thought gets its own expander UI.
class_docstr_tok: ["Encapsulates","the","Streamlit","UI","for","a","single","LLM","'thought","'","during","a","LangChain","Agent","run",".","Each","tool","usage","gets","its","own","thought",";","and","runs","also","generally","having","a","concluding","thought","where","the","Agent","determines","that","it","has","an","answer","to","the","prompt",".","Each","thought","gets","its","own","expander","UI","."]
code: def on_tool_error(
      self, error: BaseException, *args: Any, **kwargs: Any
  ) -> None:
      self._container.markdown("**Tool encountered an error...**")
      self._container.exception(error)
      self._container.update(state="error")
  
imports: from __future__ import annotations
  import time
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional
  from langchain.callbacks.base import BaseCallbackHandler
  from langchain.schema import AgentAction, AgentFinish, LLMResult
  from streamlit.runtime.metrics_util import gather_metrics
label_desc: Use image node_id 11 for calling the LLMThought obj's underlying member method code with example usage: obj.on_tool_error(error) without return types