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","."]
code: def __init__(
      self,
      credentials: Dict[str, str],
      cache_path: str,
      mongo_uri: str = "",
  ):
      self.credentials = credentials
      self.cache_path = cache_path
      self.mongo_uri = mongo_uri
      self.clients: Dict[str, Client] = {}
      self.tokenizer_clients: Dict[str, Client] = {}
      # self.critique_client is lazily instantiated by get_critique_client()
      self.critique_client: Optional[CritiqueClient] = None
      huggingface_cache_config = self._build_cache_config("huggingface")
      self.huggingface_client = HuggingFaceClient(
          huggingface_cache_config
      )
      hlog(f"AutoClient: cache_path = {cache_path}")
      hlog(f"AutoClient: mongo_uri = {mongo_uri}")
  
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 1 to create a new AutoClient object from inherited base classes: Client with example: obj = AutoClient(credentials, cache_path, mongo_uri)