class_docstr: Implements some "models" that just generate silly things quickly just to debug the infrastructure.
class_docstr_tok: ["Implements","some","``","models","''","that","just","generate","silly","things","quickly","just","to","debug","the","infrastructure","."]
code: def make_request(self, request: Request) -> RequestResult:
      raw_request = {
          "engine": request.model_engine,
          "prompt": request.prompt,
          "n": request.num_completions,
      }
  
      if request.model_engine == "model1":
  
          def do_it():
              return self.invoke_model1(raw_request)
  
          cache_key = Client.make_cache_key(raw_request, request)
          response, cached = self.cache.get(
              cache_key, wrap_request_time(do_it)
          )
          completions = [
              Sequence(
                  text=text,
                  logprob=logprob,
                  tokens=[
                      Token(
                          text=text,
                          logprob=logprob,
                          top_logprobs=response["completions"],
                      )
                  ],
              )
              for text, logprob in response["completions"].items()
          ]
      else:
          raise ValueError(f"Invalid model: {request.model}")
  
      return RequestResult(
          success=True,
          cached=False,
          request_time=0,
          request_datetime=response.get("request_datetime"),
          completions=completions,
          embedding=[],
      )
  
file_path: H2O/h2o_hf/helm/src/helm/proxy/clients/simple_client.py
imports: from typing import List, Dict
  from helm.common.cache import Cache, CacheConfig
  from helm.common.request import Request, RequestResult, Sequence, Token
  from helm.common.tokenization_request import DecodeRequest, DecodeRequestResult, TokenizationRequest, TokenizationRequestResult, TokenizationToken
  from .client import Client, wrap_request_time
label_desc: Use image node_id 3 for calling the SimpleClient obj's underlying member method code with example usage: obj.make_request(request) and returns: RequestResult, self