Enums

class ibm_watsonx_gov.entities.enums.ContainerType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

PROJECT = 'project'
SPACE = 'space'
class ibm_watsonx_gov.entities.enums.EvaluationProvider(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Supported evaluation providers for metrics computation

DETECTORS = 'detectors'
UNITXT = 'unitxt'
WATSONX_GOV = 'watsonx_governance'
static values()

Get all values of the enum

class ibm_watsonx_gov.entities.enums.EvaluationStage(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Supported evaluation stages

DEVELOPMENT = 'development'
PRE_PRODUCTION = 'pre_production'
PRODUCTION = 'production'
class ibm_watsonx_gov.entities.enums.EvaluatorFields(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Fields used in the evaluator

CONTEXT_FIELDS = 'context_fields'
CONVERSATION_ID_FIELD = 'conversation_id_field'
INPUT_FIELDS = 'input_fields'
INTERACTION_ID_FIELD = 'interaction_id_field'
OUTPUT_FIELDS = 'output_fields'
PROMPT_FIELD = 'prompt_field'
RECORD_ID_FIELD = 'record_id_field'
RECORD_TIMESTAMP_FIELD = 'record_timestamp_field'
REFERENCE_FIELDS = 'reference_fields'
TOOL_CALLS_FIELD = 'tool_calls_field'
static get_default_fields_mapping() dict[EvaluatorFields, str | list[str]]

Get the default fields mapping for the evaluator

class ibm_watsonx_gov.entities.enums.GraniteGuardianRisks(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ANSWER_RELEVANCE = 'answer_relevance'
CONTEXT_RELEVANCE = 'context_relevance'
EVASIVENESS = 'evasiveness'
FAITHFULNESS = 'faithfulness'
HARM = 'harm'
HARM_ENGAGEMENT = 'harm_engagement'
JAILBREAK = 'jailbreak'
PROFANITY = 'profanity'
SEXUAL_CONTENT = 'sexual_content'
SOCIAL_BIAS = 'social_bias'
TOOL_CALL_ACCURACY = 'tool_call_accuracy'
UNETHICAL_BEHAVIOR = 'unethical_behavior'
VIOLENCE = 'violence'
static values()
class ibm_watsonx_gov.entities.enums.InputDataType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Supported input data types

IMAGE = 'unstructured_image'
MULTIMODAL = 'multimodal'
STRUCTURED = 'structured'
TEXT = 'unstructured_text'
class ibm_watsonx_gov.entities.enums.MetricGroup(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ANSWER_QUALITY = 'answer_quality'
CONTENT_SAFETY = 'content_safety'
PERFORMANCE = 'performance'
READABILITY = 'readability'
RETRIEVAL_QUALITY = 'retrieval_quality'
TOOL_CALL_QUALITY = 'tool_call_quality'
USAGE = 'usage'
get_metrics() list[GenAIMetric]

Helper method to return a list of metrics under each metric group

Returns:

list of gen AI metrics for the specified metric group

Return type:

list[GenAIMetric]

class ibm_watsonx_gov.entities.enums.MistakeType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Enum for TCH Mistake Type

ALLOWED_VALUES = 'Allowed values'
HALLUCINATED_CALL = 'Hallucinated API call'
HALLUCINATED_PARAM = 'Hallucinated parameter'
NEED_MORE_APIS = 'Need more APIs'
NEED_MORE_INFORMATION = 'Need more information'
NONE_FUNC = "Not able to identify the user's intent."
PARAM_TYPE = 'Incorrect parameter value type'
REQ_PARAM_MISSING = 'Missing required parameter'
WRONG_API_SELECTION = 'Wrong API selection'
WRONG_NUMBER_OF_APIS = 'Wrong number of APIs'
WRONG_PARAMETER_VALUE = 'Wrong parameter value'
WRONG_UNITS_TRANSFORMATION = 'Wrong units transformation'
class ibm_watsonx_gov.entities.enums.ModelProviderType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Supported model provider types for Generative AI

AZURE_OPENAI = 'azure_openai'
CUSTOM = 'custom'
IBM_WATSONX_AI = 'ibm_watsonx.ai'
OPENAI = 'openai'
RITS = 'rits'
class ibm_watsonx_gov.entities.enums.ProblemType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Supported problem types for predictive AI models

BINARY = 'binary'
MULTICLASS = 'multiclass'
REGRESSION = 'regression'
class ibm_watsonx_gov.entities.enums.Region(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Supported IBM Cloud regions

AU_SYD = 'au-syd'
CA_TOR = 'ca-tor'
EU_DE = 'eu-de'
EU_GB = 'eu-gb'
JP_TOK = 'jp-tok'
US_SOUTH = 'us-south'
static values()

Get all values of the enum

class ibm_watsonx_gov.entities.enums.TaskType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Supported task types for generative AI models

CLASSIFICATION = 'classification'
EXTRACTION = 'extraction'
GENERATION = 'generation'
QA = 'question_answering'
RAG = 'retrieval_augmented_generation'
SUMMARIZATION = 'summarization'
get_metrics() list[GenAIMetric]

Helper method to return a list of metrics for the task type

Returns:

list of gen AI metrics for the specified task type

Return type:

list[GenAIMetric]

static values()