Skip to main content

encode_question

Encode multiple prompt instructions into a single string.

APIBenchBenchmark

APIBench Benchmark adopted from Gorilla: Large Language Model Connected with Massive APIs <https://huggingface.co/datasets/gorilla-llm/APIBench>. Parameters:
  • data_dir (str): The directory to save the data.
  • save_to (str): The file to save the results.
  • processes (int, optional): The number of processes to use. (default: :obj:1)

init

Initialize the APIBench benchmark. Parameters:
  • data_dir (str): The directory to save the data.
  • save_to (str): The file to save the results.
  • processes (int, optional): The number of processes to use for parallel processing. (default: :obj:1)

download

Download the APIBench dataset.

load

Load the APIBench Benchmark dataset. Parameters:
  • dataset_name (str): Name of the specific dataset to be loaded.
  • force_download (bool, optional): Whether to force download the data. (default: :obj:False)

run

Run the benchmark. Parameters:
  • agent (ChatAgent): The agent to run the benchmark. dataset_name (Literal[“huggingface”, “tensorflowhub”, “torchhub”]): The dataset to run the benchmark.
  • randomize (bool, optional): Whether to randomize the data. (default: :obj:False)
  • subset (Optional[int], optional): The subset of data to run. (default: :obj:None)

get_all_sub_trees

ast_parse

get_args

ast_check

evaluate_response