code: def get_gpt_evaluation_without_logprobs(
      prompt: Dict[str, Any],
      inst: Dict[str, Any],
      metrics: List[str],
      language: str,
      reference: Dict[str, Any] = None,
      model: str = "gpt-3.5-turbo",
      max_tokens: int = 2048,
  ) -> Dict[str, Any]:
      """
      Use chat models(gpt-3.5-turbo or gpt-4) to evaluate one model answer.
  
      Temprature is set to 0 to make the model more deterministic.
  
      Args:
          prompt: a dictionary including prompt template, CoT and metrics.
          inst: the instruction that is needed to be evaluated.
          metrics: the metrics for evaluation.
          language: language used to change the CoT(add one more step about comparing the given answer and reference) if reference is not None.
          reference: the reference answer.
          model: the model used to evaluate answers.
          max_tokens: the maximum number of tokens to generate in the chat completion.
  
      Returns:
          An evaluation of one answer.
      """
  
      MAX_API_RETRY = 3
  
      question = (
          inst["instruction"]
          if inst["input"] == ""
          else inst["instruction"] + "\n" + inst["input"]
      )
      answer = inst["output"]
      inst["evaluation"] = {}
  
      for metric in metrics:
          if prompt["metrics"].get(metric, None) is None:
              raise Exception(
                  f"Unsupported metric {metric} for category {inst['category']}! You should add this metric in the prompt file!"
              )
          for i in range(MAX_API_RETRY):
              try:
                  prompt_reference = (
                      ""
                      if reference is None
                      else reference_template(
                          metric, language, reference
                      )
                  )
  
                  prompt_1st_round = prompt["prompt"].format(
                      question=question,
                      answer=answer,
                      metric=prompt["metrics"][metric],
                      steps=prompt["CoT"][metric],
                  )
  
                  if prompt_reference and (
                      reference["target"] or reference["output"]
                  ):
                      # Do a 2-round conversation
                      response = multiturn_chat_completion(
                          [prompt_1st_round, prompt_reference],
                          model,
                          max_tokens=max_tokens,
                          turns=2,
                      )
                  else:
                      response = multiturn_chat_completion(
                          [prompt_1st_round],
                          model,
                          max_tokens=max_tokens,
                          turns=1,
                      )
  
                  inst["evaluation"][metric] = {
                      "response": response["choices"][0]["message"][
                          "content"
                      ],
                      "logprobs": None,
                  }
  
                  # Prevent exceeding rate limits because we have multiple workers.
                  # But this will slow down the evaluation process.
                  # You can comment this line if your request doesn't contain many tokens.
                  time.sleep(len(metrics) * 0.5)
  
                  break
              except Exception as e:
                  print(e)
                  time.sleep(1)
          if metric not in inst["evaluation"]:
              print(
                  f"Evaluation {inst['id']} for metric {metric} failed after {MAX_API_RETRY} retries."
              )
              inst["evaluation"][metric] = {}
      return inst
  
imports: import concurrent.futures
  import os
  import re
  import time
  from copy import deepcopy
  from typing import Any, Dict, List
  import matplotlib.pyplot
  import numpy
  import openai
  import pandas
  import seaborn
  import tqdm
  from colossal_eval.utils import jdump, jload
label_desc: Use image node_id 8 for calling a global function with example usage: get_gpt_evaluation_without_logprobs(prompt, inst, metrics, language, reference, model, max_tokens) and returns: inst