code: from typing import Any
  
  from llama_index.core.callbacks.base_handler import BaseCallbackHandler
  from llama_index.core.callbacks.simple_llm_handler import SimpleLLMHandler
  
  
  def set_global_handler(eval_mode: str, **eval_params: Any) -> None:
      """Set global eval handlers."""
      import llama_index.core
  
      llama_index.core.global_handler = create_global_handler(eval_mode, **eval_params)
  
  
  def create_global_handler(eval_mode: str, **eval_params: Any) -> BaseCallbackHandler:
      """Get global eval handler."""
      if eval_mode == "wandb":
          try:
              from llama_index.callbacks.wandb import (
                  WandbCallbackHandler,
              )  # pants: no-infer-dep
          except ImportError:
              raise ImportError(
                  "WandbCallbackHandler is not installed. "
                  "Please install it using `pip install llama-index-callbacks-wandb`"
              )
  
          handler: BaseCallbackHandler = WandbCallbackHandler(**eval_params)
      elif eval_mode == "openinference":
          try:
              from llama_index.callbacks.openinference import (
                  OpenInferenceCallbackHandler,
              )  # pants: no-infer-dep
          except ImportError:
              raise ImportError(
                  "OpenInferenceCallbackHandler is not installed. "
                  "Please install it using `pip install llama-index-callbacks-openinference`"
              )
  
          handler = OpenInferenceCallbackHandler(**eval_params)
      elif eval_mode == "arize_phoenix":
          try:
              from llama_index.callbacks.arize_phoenix import (
                  arize_phoenix_callback_handler,
              )  # pants: no-infer-dep
          except ImportError:
              raise ImportError(
                  "ArizePhoenixCallbackHandler is not installed. "
                  "Please install it using `pip install llama-index-callbacks-arize-phoenix`"
              )
  
          handler = arize_phoenix_callback_handler(**eval_params)
      elif eval_mode == "honeyhive":
          try:
              from llama_index.callbacks.honeyhive import (
                  honeyhive_callback_handler,
              )  # pants: no-infer-dep
          except ImportError:
              raise ImportError(
                  "HoneyHiveCallbackHandler is not installed. "
                  "Please install it using `pip install llama-index-callbacks-honeyhive`"
              )
          handler = honeyhive_callback_handler(**eval_params)
      elif eval_mode == "promptlayer":
          try:
              from llama_index.callbacks.promptlayer import (
                  PromptLayerHandler,
              )  # pants: no-infer-dep
          except ImportError:
              raise ImportError(
                  "PromptLayerHandler is not installed. "
                  "Please install it using `pip install llama-index-callbacks-promptlayer`"
              )
          handler = PromptLayerHandler(**eval_params)
      elif eval_mode == "deepeval":
          try:
              from llama_index.callbacks.deepeval import (
                  deepeval_callback_handler,
              )  # pants: no-infer-dep
          except ImportError:
              raise ImportError(
                  "DeepEvalCallbackHandler is not installed. "
                  "Please install it using `pip install llama-index-callbacks-deepeval`"
              )
          handler = deepeval_callback_handler(**eval_params)
      elif eval_mode == "simple":
          handler = SimpleLLMHandler(**eval_params)
      elif eval_mode == "argilla":
          try:
              from llama_index.callbacks.argilla import (
                  argilla_callback_handler,
              )  # pants: no-infer-dep
          except ImportError:
              raise ImportError(
                  "ArgillaCallbackHandler is not installed. "
                  "Please install it using `pip install llama-index-callbacks-argilla`"
              )
          handler = argilla_callback_handler(**eval_params)
      else:
          raise ValueError(f"Eval mode {eval_mode} not supported.")
  
      return handler
  
apis: llama_index.callbacks.openinference.OpenInferenceCallbackHandler llama_index.callbacks.promptlayer.PromptLayerHandler llama_index.callbacks.deepeval.deepeval_callback_handler llama_index.callbacks.arize_phoenix.arize_phoenix_callback_handler llama_index.callbacks.wandb.WandbCallbackHandler llama_index.callbacks.honeyhive.honeyhive_callback_handler llama_index.core.callbacks.simple_llm_handler.SimpleLLMHandler llama_index.callbacks.argilla.argilla_callback_handler
extract_api: [((941, 976), 'llama_index.callbacks.wandb.WandbCallbackHandler', 'WandbCallbackHandler', ([], {}), '(**eval_params)\n', (961, 976), False, 'from llama_index.callbacks.wandb import WandbCallbackHandler\n'), ((1424, 1467), 'llama_index.callbacks.openinference.OpenInferenceCallbackHandler', 'OpenInferenceCallbackHandler', ([], {}), '(**eval_params)\n', (1452, 1467), False, 'from llama_index.callbacks.openinference import OpenInferenceCallbackHandler\n'), ((1916, 1961), 'llama_index.callbacks.arize_phoenix.arize_phoenix_callback_handler', 'arize_phoenix_callback_handler', ([], {}), '(**eval_params)\n', (1946, 1961), False, 'from llama_index.callbacks.arize_phoenix import arize_phoenix_callback_handler\n'), ((2390, 2431), 'llama_index.callbacks.honeyhive.honeyhive_callback_handler', 'honeyhive_callback_handler', ([], {}), '(**eval_params)\n', (2416, 2431), False, 'from llama_index.callbacks.honeyhive import honeyhive_callback_handler\n'), ((2852, 2885), 'llama_index.callbacks.promptlayer.PromptLayerHandler', 'PromptLayerHandler', ([], {}), '(**eval_params)\n', (2870, 2885), False, 'from llama_index.callbacks.promptlayer import PromptLayerHandler\n'), ((3309, 3349), 'llama_index.callbacks.deepeval.deepeval_callback_handler', 'deepeval_callback_handler', ([], {}), '(**eval_params)\n', (3334, 3349), False, 'from llama_index.callbacks.deepeval import deepeval_callback_handler\n'), ((3400, 3431), 'llama_index.core.callbacks.simple_llm_handler.SimpleLLMHandler', 'SimpleLLMHandler', ([], {}), '(**eval_params)\n', (3416, 3431), False, 'from llama_index.core.callbacks.simple_llm_handler import SimpleLLMHandler\n'), ((3850, 3889), 'llama_index.callbacks.argilla.argilla_callback_handler', 'argilla_callback_handler', ([], {}), '(**eval_params)\n', (3874, 3889), False, 'from llama_index.callbacks.argilla import argilla_callback_handler\n')]