class_docstr: Similar to H2OTextIteratorStreamer that is for HF backend, but here LangChain backend
class_docstr_tok: ["Similar","to","H2OTextIteratorStreamer","that","is","for","HF","backend",",","but","here","LangChain","backend"]
docstr: Run when LLM errors.
docstr_tok: ["Run","when","LLM","errors","."]
code: def on_llm_error(
      self, error: Union[Exception, KeyboardInterrupt], **kwargs: Any
  ) -> None:
      """Run when LLM errors."""
      self.text_queue.put(self.stop_signal)
  
imports: import copy
  import os
  import types
  import uuid
  from typing import Any, Dict, List, Union, Optional, Tuple, Mapping
  import time
  import queue
  import pathlib
  from datetime import datetime
  from langchain.schema import BasePromptTemplate
  from langchain.chains import LLMChain
  from langchain.chains import MapReduceDocumentsChain, StuffDocumentsChain, ReduceDocumentsChain
  from langchain.chains.combine_documents.base import BaseCombineDocumentsChain
  from langchain.chains.summarize import map_reduce_prompt, LoadingCallable, _load_stuff_chain, _load_map_reduce_chain, _load_refine_chain
  from langchain.schema.language_model import BaseLanguageModel
  from src.utils import hash_file, get_sha
  from langchain.callbacks.base import BaseCallbackHandler, Callbacks
  from langchain.schema import LLMResult
  from langchain.text_splitter import RecursiveCharacterTextSplitter
  from langchain.docstore.document import Document
  import logging
  from typing import Any, Dict, Optional
  from langchain_core.pydantic_v1 import BaseModel, root_validator
label_desc: Use image node_id 5 for calling the StreamingGradioCallbackHandler obj's underlying member method code with example usage: obj.on_llm_error(error) without return types