root.objectives =============== .. py:module:: root.objectives Classes ------- .. autoapisummary:: root.objectives.AObjective root.objectives.Objective root.objectives.Objectives root.objectives.Versions Module Contents --------------- .. py:class:: AObjective Bases: :py:obj:`root.generated.openapi_aclient.models.objective.Objective` Wrapper for a single Objective. For available attributes, please check the (automatically generated) superclass documentation. .. py:method:: arun(*, response: str, request: Optional[str] = None, contexts: Optional[List[str]] = None, functions: Optional[List[root.generated.openapi_aclient.models.evaluator_execution_functions_request.EvaluatorExecutionFunctionsRequest]] = None, _request_timeout: Optional[int] = None) -> root.generated.openapi_aclient.models.validator_execution_result.ValidatorExecutionResult :async: Asynchronously run all validators associated with the objective. :param response: LLM output. :param request: The prompt sent to the LLM. Optional. :param contexts: Optional documents passed to RAG evaluators .. py:class:: Objective Bases: :py:obj:`root.generated.openapi_client.models.objective.Objective` Wrapper for a single Objective. For available attributes, please check the (automatically generated) superclass documentation. .. py:method:: run(*, response: str, request: Optional[str] = None, contexts: Optional[List[str]] = None, functions: Optional[List[root.generated.openapi_client.models.evaluator_execution_functions_request.EvaluatorExecutionFunctionsRequest]] = None, _request_timeout: Optional[int] = None) -> root.generated.openapi_client.models.validator_execution_result.ValidatorExecutionResult Run all validators associated with the objective. :param response: LLM output. :param request: The prompt sent to the LLM. Optional. :param contexts: Optional documents passed to RAG evaluators .. py:class:: Objectives(client: Union[Awaitable[root.generated.openapi_aclient.ApiClient], root.generated.openapi_client.ApiClient]) Objectives API .. note:: The construction of the API instance should be handled by accesing an attribute of a :class:`root.client.RootSignals` instance. .. py:method:: acreate(*, intent: Optional[str] = None, validators: Optional[List[root.validators.AValidator]] = None, test_dataset_id: Optional[str] = None, _request_timeout: Optional[int] = None) -> AObjective :async: Asynchronously create a new objective and return its ID. :param intent: The intent of the objective. :param validators: An optional list of validators. :param test_dataset_id: The ID of the test dataset .. py:method:: adelete(objective_id: str, *, _request_timeout: Optional[int] = None) -> None :async: Asynchronously delete the objective from the registry. :param objective_id: The objective to be deleted. .. py:method:: aget(objective_id: str, *, _request_timeout: Optional[int] = None) -> AObjective :async: Asynchronously get an objective by ID. :param objective_id: The objective to be fetched. .. py:method:: alist(*, intent: Optional[str] = None, limit: int = 100) -> AsyncIterator[root.generated.openapi_aclient.models.objective_list.ObjectiveList] :async: Asynchronously iterate through the objectives. .. note:: The call will list only publicly available global objectives and those objectives available to the organzation(s) of the user. :param intent: Specific intent the returned objectives must match. :param limit: Number of entries to iterate through at most. .. py:method:: arun(objective_id: str, *, response: str, request: Optional[str] = None, contexts: Optional[List[str]] = None, functions: Optional[List[root.generated.openapi_aclient.models.evaluator_execution_functions_request.EvaluatorExecutionFunctionsRequest]] = None, _request_timeout: Optional[int] = None) -> root.generated.openapi_aclient.models.validator_execution_result.ValidatorExecutionResult :async: Asynchronously run all validators associated with an objective. :param response: LLM output. :param request: The prompt sent to the LLM. Optional. :param contexts: Optional documents passed to RAG evaluators .. py:method:: aupdate(objective_id: str, *, intent: Optional[str] = None, validators: Optional[List[root.validators.AValidator]] = None, test_dataset_id: Optional[str] = None, _request_timeout: Optional[int] = None) -> AObjective :async: Asynchronously update an existing objective. :param objective_id: The objective to be updated. :param intent: The intent of the objective. :param validators: An optional list of validators. .. py:method:: create(*, intent: Optional[str] = None, validators: Optional[List[root.validators.Validator]] = None, test_dataset_id: Optional[str] = None, _request_timeout: Optional[int] = None) -> Objective Create a new objective and return its ID. :param intent: The intent of the objective. :param validators: An optional list of validators. :param test_dataset_id: The ID of the test dataset .. py:method:: delete(objective_id: str, *, _request_timeout: Optional[int] = None) -> None Delete the objective from the registry. :param objective_id: The objective to be deleted. .. py:method:: get(objective_id: str, *, _request_timeout: Optional[int] = None) -> Objective Get an objective by ID. :param objective_id: The objective to be fetched. .. py:method:: list(*, intent: Optional[str] = None, limit: int = 100) -> Iterator[root.generated.openapi_client.models.objective_list.ObjectiveList] Iterate through the objectives. .. note:: The call will list only publicly available global objectives and those objectives available to the organzation(s) of the user. :param intent: Specific intent the returned objectives must match. :param limit: Number of entries to iterate through at most. .. py:method:: run(objective_id: str, *, response: str, request: Optional[str] = None, contexts: Optional[List[str]] = None, functions: Optional[List[root.generated.openapi_client.models.evaluator_execution_functions_request.EvaluatorExecutionFunctionsRequest]] = None, _request_timeout: Optional[int] = None) -> root.generated.openapi_client.models.validator_execution_result.ValidatorExecutionResult Run all validators associated with an objective. :param response: LLM output. :param request: The prompt sent to the LLM. Optional. :param contexts: Optional documents passed to RAG evaluators .. py:method:: update(objective_id: str, *, intent: Optional[str] = None, validators: Optional[List[root.validators.Validator]] = None, test_dataset_id: Optional[str] = None, _request_timeout: Optional[int] = None) -> Objective Update an existing objective. :param objective_id: The objective to be updated. :param intent: The intent of the objective. :param validators: An optional list of validators. .. py:attribute:: client .. py:attribute:: versions .. py:class:: Versions(client: Union[Awaitable[root.generated.openapi_aclient.ApiClient], root.generated.openapi_client.ApiClient]) Version listing (sub)API Note that this should not be directly instantiated. .. py:method:: alist(objective_id: str) -> root.generated.openapi_aclient.models.paginated_objective_list.PaginatedObjectiveList :async: Asynchronously list all versions of an objective. :param objective_id: The objective to list the versions for .. py:method:: list(objective_id: str) -> root.generated.openapi_client.models.paginated_objective_list.PaginatedObjectiveList List all versions of an objective. :param objective_id: The objective to list the versions for