Skip to main content

agentchat.contrib.agent_eval.criterion

Criterion

class Criterion(BaseModel)

A class that represents a criterion for agent evaluation.

parse_json_str

@staticmethod
def parse_json_str(criteria: str)

Create a list of Criterion objects from a json string.

Arguments:

  • criteria str - Json string that represents the criteria returns:
  • [Criterion] - A list of Criterion objects that represents the json criteria information.

write_json

@staticmethod
def write_json(criteria)

Create a json string from a list of Criterion objects.

Arguments:

  • criteria [Criterion] - A list of Criterion objects.

Returns:

  • str - A json string that represents the list of Criterion objects.