docstr: Return our most recent completed LLMThought, or None if we don't have one.
docstr_tok: ["Return","our","most","recent","completed","LLMThought",",","or","None","if","we","do","n't","have","one","."]
code: def _get_last_completed_thought(self) -> Optional[LLMThought]:
      """Return our most recent completed LLMThought, or None if we don't have one."""
      if len(self._completed_thoughts) > 0:
          return self._completed_thoughts[
              len(self._completed_thoughts) - 1
          ]
      return None
  
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 3 for calling the StreamlitCallbackHandler obj's underlying member method code with example usage: obj._get_last_completed_thought() and returns: None, self