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 __init__(
      self,
      parent_container: DeltaGenerator,
      labeler: LLMThoughtLabeler,
      expanded: bool,
      collapse_on_complete: bool,
  ):
      self._container = parent_container.status(
          labeler.get_initial_label(), expanded=expanded
      )
  
      self._state = LLMThoughtState.THINKING
      self._llm_token_stream = ""
      self._llm_token_stream_placeholder: Optional[
          DeltaGenerator
      ] = None
      self._last_tool: Optional[ToolRecord] = None
      self._collapse_on_complete = collapse_on_complete
      self._labeler = labeler
  
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 1 to create a new LLMThought object  with example: obj = LLMThought(parent_container, labeler, expanded, collapse_on_complete)