class_docstr: Callable class that executes the contents of a Magics cell.
  
  An LLMFunction is constructed from the Magics command line and cell contents
  specified by the user. It is defined by:
  - A model instance,
  - Model arguments
  - A prompt template (e.g. "the opposite of hot is {word}") with an optional
    keyword placeholder.
  
  The LLMFunction takes as its input a sequence of dictionaries containing
  values for keyword replacement, e.g. [{"word": "hot"}, {"word": "tall"}].
  
  This will cause the model to be executed with the following prompts:
    "The opposite of hot is"
    "The opposite of tall is"
  
  The results will be returned in a LLMFnOutputs instance.
docstr: Constructor.
  
  Args:
    model: The model that the prompts will execute on.
    prompts: A sequence of prompt templates with optional placeholders. The
      placeholders will be replaced by the inputs passed into this function.
    model_args: Optional set of model arguments to configure how the model
      executes the prompts.
    outputs_ipython_display_fn: See documentation in LLMFunction.__init__().
docstr_tok: ["Constructor",".","Args",":","model",":","The","model","that","the","prompts","will","execute","on",".","prompts",":","A","sequence","of","prompt","templates","with","optional","placeholders",".","The","placeholders","will","be","replaced","by","the","inputs","passed","into","this","function",".","model_args",":","Optional","set","of","model","arguments","to","configure","how","the","model","executes","the","prompts",".","outputs_ipython_display_fn",":","See","documentation","in","LLMFunction.__init__","(",")","."]
code: def __init__(
      self,
      model: model_lib.AbstractModel,
      prompts: Sequence[str],
      model_args: model_lib.ModelArguments | None = None,
      outputs_ipython_display_fn: Callable[
          [llmfn_outputs.LLMFnOutputs], None
      ]
      | None = None,
  ):
      """Constructor.
  
      Args:
        model: The model that the prompts will execute on.
        prompts: A sequence of prompt templates with optional placeholders. The
          placeholders will be replaced by the inputs passed into this function.
        model_args: Optional set of model arguments to configure how the model
          executes the prompts.
        outputs_ipython_display_fn: See documentation in LLMFunction.__init__().
      """
      super().__init__(
          outputs_ipython_display_fn=outputs_ipython_display_fn
      )
      self._model = model
      self._prompts = prompts
      self._model_args = (
          model_lib.ModelArguments()
          if model_args is None
          else model_args
      )
  
      # Compute placeholders.
      self._placeholders = frozenset({})
      for prompt in self._prompts:
          self._placeholders = self._placeholders.union(
              prompt_utils.get_placeholders(prompt)
          )
  
imports: from __future__ import annotations
  import abc
  import dataclasses
  from typing import AbstractSet, Any, Callable, Iterable, Mapping, Optional, Sequence, Union
  from google.generativeai.notebook.lib import llmfn_input_utils
  from google.generativeai.notebook.lib import llmfn_output_row
  from google.generativeai.notebook.lib import llmfn_outputs
  from google.generativeai.notebook.lib import llmfn_post_process
  from google.generativeai.notebook.lib import llmfn_post_process_cmds
  from google.generativeai.notebook.lib import model
  from google.generativeai.notebook.lib import prompt_utils
label_desc: Use image node_id 1 to create a new LLMFunctionImpl object from inherited base classes: LLMFunction with example: obj = LLMFunctionImpl(model, prompts, model_args, outputs_ipython_display_fn)