code: def test_eval_json():
      base_model = "h2oai/h2ogpt-oig-oasst1-512-6_9b"
      cpu = False
      bits = 8
  
      # make 2 rows of json
      prompts = [
          dict(instruction="Who are you?", output="I'm h2oGPT"),
          dict(instruction="What is 2+2?", output="4"),
      ]
      eval_filename = "test_prompts.json"
      remove(eval_filename)
      import json
  
      with open(eval_filename, "wt") as f:
          f.write(json.dumps(prompts, indent=2))
  
      eval_out_filename = run_eval1(
          cpu=cpu,
          bits=bits,
          base_model=base_model,
          eval_filename=eval_filename,
          eval_prompts_only_num=len(prompts),
      )
      df = pd.read_parquet(eval_out_filename)
      val0 = "My name is h2oGPT. I'm a large language model trained by H2O.ai. How may I assist you?"
      val1 = """Hi! I'm h2oGPT, a large language model by H2O.ai, the visionary leader in democratizing AI. How may I assist you?"""
      val2 = """Hi! I'm h2oGPT, a large language model by H2O.ai"""
      val3 = """My name is h2oGPT. I'm a large language model trained by H2O.ai. How may I assist you?"""
      val4 = """ I'm h2oGPT, a large language model by H2O.ai. How may I assist you?"""
      assert (
          df["response"].values[0] == val0
          or df["response"].values[0] == " " + val0
          or df["response"].values[0] == val1
          or df["response"].values[0] == val3
          or df["response"].values[0] == val4
          or val2 in df["response"].values[0]
      )
      assert df["score"].values[0] > 0.03  # odd score IMO
      assert df["response"].values[1] in [
          "2 + 2 = 4\n",
          "2+2 = 4\n",
          " 2 + 2 = 4\n",
          " 4\n",
      ]
      assert df["score"].values[1] > 0.5
  
file_path: h2ogpt/tests/test_eval.py
imports: import pandas
  import pytest
  from tests.utils import wrap_test_forked, make_user_path_test
  from src.enums import DocumentSubset, LangChainAction, docs_joiner_default
  from src.utils import remove
label_desc: Use image node_id 2 for calling a global function with example usage: test_eval_json() without return types