class_docstr: Wrapper around the BigDL-LLM
  
  Example:
      .. code-block:: python
  
          from langchain.llms import LlamaLLM
          llm = LlamaLLM(model_path="/path/to/llama/model")
docstr: Yields results objects as they are generated in real time.
  
  BETA: this is a beta feature while we figure out the right abstraction.
  Once that happens, this interface could change.
  
  It also calls the callback manager's on_llm_new_token event with
  similar parameters to the OpenAI LLM class method of the same name.
  
  Args:
      prompt: The prompts to pass into the model.
      stop: Optional list of stop words to use when generating.
  
  Returns:
      A generator representing the stream of tokens being generated.
  
  Yields:
      A dictionary like objects containing a string token and metadata.
      See llama-cpp-python docs and below for more.
  
  Example:
      .. code-block:: python
  
          from langchain.llms import LlamaLLM
          llm = LlamaLLM(
              model_path="/path/to/local/model.bin",
              temperature = 0.5
          )
          for chunk in llm.stream("Ask 'Hi, how are you?' like a pirate:'",
                  stop=["'","\n"]):
              result = chunk["choices"][0]
              print(result["text"], end='', flush=True)
docstr_tok: ["Yields","results","objects","as","they","are","generated","in","real","time",".","BETA",":","this","is","a","beta","feature","while","we","figure","out","the","right","abstraction",".","Once","that","happens",",","this","interface","could","change",".","It","also","calls","the","callback","manager","'s","on_llm_new_token","event","with","similar","parameters","to","the","OpenAI","LLM","class","method","of","the","same","name",".","Args",":","prompt",":","The","prompts","to","pass","into","the","model",".","stop",":","Optional","list","of","stop","words","to","use","when","generating",".","Returns",":","A","generator","representing","the","stream","of","tokens","being","generated",".","Yields",":","A","dictionary","like","objects","containing","a","string","token","and","metadata",".","See","llama-cpp-python","docs","and","below","for","more",".","Example",":","..","code-block",":",":","python","from","langchain.llms","import","LlamaLLM","llm","=","LlamaLLM","(","model_path=","''","\/path\/to\/local\/model.bin","''",",","temperature","=","0.5",")","for","chunk","in","llm.stream","(","``","Ask","'Hi",",","how","are","you","?","'","like","a","pirate",":","'","''",",","stop=","[","``","'","''",",","''","\\n","''","]",")",":","result","=","chunk","[","``","choices","''","]","[","0","]","print","(","result","[","``","text","''","]",",","end=","''",",","flush=True",")"]
code: def stream(
      self,
      prompt: str,
      stop: Optional[List[str]] = None,
      run_manager: Optional[CallbackManagerForLLMRun] = None,
  ) -> Generator[Dict, None, None]:
      """Yields results objects as they are generated in real time.
  
      BETA: this is a beta feature while we figure out the right abstraction.
      Once that happens, this interface could change.
  
      It also calls the callback manager's on_llm_new_token event with
      similar parameters to the OpenAI LLM class method of the same name.
  
      Args:
          prompt: The prompts to pass into the model.
          stop: Optional list of stop words to use when generating.
  
      Returns:
          A generator representing the stream of tokens being generated.
  
      Yields:
          A dictionary like objects containing a string token and metadata.
          See llama-cpp-python docs and below for more.
  
      Example:
          .. code-block:: python
  
              from langchain.llms import LlamaLLM
              llm = LlamaLLM(
                  model_path="/path/to/local/model.bin",
                  temperature = 0.5
              )
              for chunk in llm.stream("Ask 'Hi, how are you?' like a pirate:'",
                      stop=["'","\\n"]):
                  result = chunk["choices"][0]
                  print(result["text"], end='', flush=True)
  
      """
      params = self._get_parameters(stop)
      result = self.client(prompt=prompt, stream=True, **params)
      for chunk in result:
          token = chunk["choices"][0]["text"]
          log_probs = chunk["choices"][0].get("logprobs", None)
          if run_manager:
              run_manager.on_llm_new_token(
                  token=token, verbose=self.verbose, log_probs=log_probs
              )
          yield chunk
  
imports: import logging
  import importlib
  from typing import Any, Dict, Generator, List, Optional
  from pydantic import Field, root_validator
  from langchain.callbacks.manager import CallbackManagerForLLMRun
  from langchain.llms.base import LLM
  from .transformersllm import TransformersLLM
label_desc: Use image node_id 7 for calling the _BaseCausalLM obj's underlying member method code with example usage: obj.stream(prompt, stop, run_manager) without return types