class_docstr: Automatically dispatch to the proper `Client` based on the organization.
class_docstr_tok: ["Automatically","dispatch","to","the","proper","`","Client","`","based","on","the","organization","."]
docstr: Get the critique client.
docstr_tok: ["Get","the","critique","client","."]
code: def get_critique_client(self) -> CritiqueClient:
      """Get the critique client."""
      critique_type = self.credentials.get("critiqueType")
      if critique_type == "random":
          self.critique_client = RandomCritiqueClient()
      elif critique_type == "mturk":
          self.critique_client = MechanicalTurkCritiqueClient()
      elif critique_type == "surgeai":
          surgeai_credentials = self.credentials.get("surgeaiApiKey")
          if not surgeai_credentials:
              raise ValueError(
                  "surgeaiApiKey credentials are required for SurgeAICritiqueClient"
              )
          self.critique_client = SurgeAICritiqueClient(
              surgeai_credentials, self._build_cache_config("surgeai")
          )
      else:
          raise ValueError(
              "CritiqueClient is not configured; set critiqueType to 'mturk', 'mturk-sandbox', 'surgeai' or 'random'"
          )
      return self.critique_client
  
imports: import os
  from dataclasses import replace
  from typing import Dict, Optional
  from retrying import RetryError, Attempt
  from helm.common.cache import CacheConfig, MongoCacheConfig, SqliteCacheConfig
  from helm.common.hierarchical_logger import hlog
  from helm.common.request import Request, RequestResult
  from helm.common.tokenization_request import TokenizationRequest, TokenizationRequestResult, DecodeRequest, DecodeRequestResult
  from helm.proxy.retry import retry_request
  from .critique_client import CritiqueClient, RandomCritiqueClient, SurgeAICritiqueClient
  from .mechanical_turk_critique_client import MechanicalTurkCritiqueClient
  from .client import Client
  from .ai21_client import AI21Client
  from .aleph_alpha_client import AlephAlphaClient
  from .anthropic_client import AnthropicClient
  from .chat_gpt_client import ChatGPTClient
  from .cohere_client import CohereClient
  from .together_client import TogetherClient
  from .google_client import GoogleClient
  from .goose_ai_client import GooseAIClient
  from .huggingface_client import HuggingFaceClient
  from .ice_tokenizer_client import ICETokenizerClient
  from .megatron_client import MegatronClient
  from .openai_client import OpenAIClient
  from .microsoft_client import MicrosoftClient
  from .perspective_api_client import PerspectiveAPIClient
  from .palmyra_client import PalmyraClient
  from .yalm_tokenizer_client import YaLMTokenizerClient
  from .simple_client import SimpleClient
  from helm.proxy.clients.huggingface_model_registry import get_huggingface_model_config
label_desc: Use image node_id 9 for calling the AutoClient obj's underlying member method code with example usage: obj.get_critique_client() and returns: self