Skip to main content

module aixplain.factories.model_factory.utils

Global Variables

  • FunctionInputOutput

function create_model_from_response

create_model_from_response(response: Dict) → Model

Converts response Json to 'Model' object

Args:

  • response (Dict): Json from API

Returns:

  • Model: Coverted 'Model' object

function get_assets_from_page

get_assets_from_page(
query,
page_number: int,
page_size: int,
function: Function,
suppliers: Union[Supplier, List[Supplier]],
source_languages: Union[Language, List[Language]],
target_languages: Union[Language, List[Language]],
is_finetunable: bool = None,
ownership: Optional[Tuple[OwnershipType, List[OwnershipType]]] = None,
sort_by: Optional[SortBy] = None,
sort_order: SortOrder = <SortOrder.ASCENDING: 1>
) → List[Model]