Skip to content

/AWS1/IF_BDO=>GETEVALUATOR()

About GetEvaluator

Retrieves detailed information about an evaluator, including its configuration, status, and metadata. Works with both built-in and custom evaluators.

Method Signature

METHODS /AWS1/IF_BDO~GETEVALUATOR
  IMPORTING
    !IV_EVALUATORID TYPE /AWS1/BDOEVALUATORID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdogetevaluatorrsp
  RAISING
    /AWS1/CX_BDOACCESSDENIEDEX
    /AWS1/CX_BDOINTERNALSERVEREX
    /AWS1/CX_BDORESOURCENOTFOUNDEX
    /AWS1/CX_BDOTHROTTLINGEX
    /AWS1/CX_BDOVALIDATIONEX
    /AWS1/CX_BDOCLIENTEXC
    /AWS1/CX_BDOSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_evaluatorid TYPE /AWS1/BDOEVALUATORID /AWS1/BDOEVALUATORID

The unique identifier of the evaluator to retrieve. Can be a built-in evaluator ID (e.g., Builtin.Helpfulness) or a custom evaluator ID.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdogetevaluatorrsp /AWS1/CL_BDOGETEVALUATORRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->getevaluator( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_evaluatorarn = lo_result->get_evaluatorarn( ).
  lv_evaluatorid = lo_result->get_evaluatorid( ).
  lv_evaluatorname = lo_result->get_evaluatorname( ).
  lv_evaluatordescription = lo_result->get_description( ).
  lo_evaluatorconfig = lo_result->get_evaluatorconfig( ).
  IF lo_evaluatorconfig IS NOT INITIAL.
    lo_llmasajudgeevaluatorcon = lo_evaluatorconfig->get_llmasajudge( ).
    IF lo_llmasajudgeevaluatorcon IS NOT INITIAL.
      lv_evaluatorinstructions = lo_llmasajudgeevaluatorcon->get_instructions( ).
      lo_ratingscale = lo_llmasajudgeevaluatorcon->get_ratingscale( ).
      IF lo_ratingscale IS NOT INITIAL.
        LOOP AT lo_ratingscale->get_numerical( ) into lo_row.
          lo_row_1 = lo_row.
          IF lo_row_1 IS NOT INITIAL.
            lv_string = lo_row_1->get_definition( ).
            lv_double = lo_row_1->get_value( ).
            lv_string = lo_row_1->get_label( ).
          ENDIF.
        ENDLOOP.
        LOOP AT lo_ratingscale->get_categorical( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_string = lo_row_3->get_definition( ).
            lv_string = lo_row_3->get_label( ).
          ENDIF.
        ENDLOOP.
      ENDIF.
      lo_evaluatormodelconfig = lo_llmasajudgeevaluatorcon->get_modelconfig( ).
      IF lo_evaluatormodelconfig IS NOT INITIAL.
        lo_bedrockevaluatormodelco = lo_evaluatormodelconfig->get_bdrkevaluatormodelconfig( ).
        IF lo_bedrockevaluatormodelco IS NOT INITIAL.
          lv_modelid = lo_bedrockevaluatormodelco->get_modelid( ).
          lo_inferenceconfiguration = lo_bedrockevaluatormodelco->get_inferenceconfig( ).
          IF lo_inferenceconfiguration IS NOT INITIAL.
            lv_integer = lo_inferenceconfiguration->get_maxtokens( ).
            lv_float = lo_inferenceconfiguration->get_temperature( ).
            lv_float = lo_inferenceconfiguration->get_topp( ).
            LOOP AT lo_inferenceconfiguration->get_stopsequences( ) into lo_row_4.
              lo_row_5 = lo_row_4.
              IF lo_row_5 IS NOT INITIAL.
                lv_nonemptystring = lo_row_5->get_value( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
          lo_value = lo_bedrockevaluatormodelco->get_addlmodelrequestfields( ).
          IF lo_value IS NOT INITIAL.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
  ENDIF.
  lv_evaluatorlevel = lo_result->get_level( ).
  lv_evaluatorstatus = lo_result->get_status( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
  lv_boolean = lo_result->get_lockedformodification( ).
ENDIF.