Manage AI Usecase Asset
- create_ai_usecase(self, catalog_id: str = None, name: str = None, description: str = None, status: str = None, risk: str = None, tags: list = None) AIUsecaseUtilities
Returns AI usecase
- Parameters:
catalog_id (str) – Catalog ID where this model usecase needs to create.
name (str) – Name of model usecase
description (str) – (Optional) Model usecase description
status (str) – (Optional) AI Usecase status.Available options are in
Status
risk (str) – (Optional) AI Usecase risk.Available options are in
Risk
tags (list) – (Optional) AI usecase tags. Provide list of tags, for example [“usecase for prod”,”model for prod”]
- Return type:
AIUsecaseUtilities
- Returns:
AI usecase asset
Example:
>>> client.assets.create_ai_usecase(catalog_id=<catalog_id>,name=<AI usecase name>,description=<AI usecase description>)
- get_ai_usecase(self, ai_usecase_id: str, catalog_id: str = None) AIUsecaseUtilities
Get AI usecase asset.
- Parameters:
ai_usecase_id (str) – Id of the ai usecase.
catalog_id (str) – Id of the catalog where ai usecase is saved.
- Return type:
AIUsecaseUtilities
The way to use me is:
>>> client.assets.get_ai_usecase(ai_usecase_id=<ai usecase id>, catalog_id=<catalog id>)
- get_ai_usecases(self, catalog_id: str = None, limit_to_apikey_account: bool = True) list
Returns AI usecase assets.
- Parameters:
catalog_id (str) – (Optional) Catalog ID where AI usecases are registered. If not provided, defaults to showing all AI usecases in all catalogs across all accounts to which the user has access.
limit_to_apikey_account (bool) – (Optional) Value is set to True by default, limiting the returned results to the current BSS account ID linked to the API key used. Can be modified and set to False when required. This flag works only when no catalog ID is passed and in a cloud environment.
- Return type:
list of AIUsecaseUtilities
- Returns:
All AI usecase assets for a catalog.
Example:
>>> client.assets.get_ai_usecases(catalog_id=<catalog_id>) >>> client.assets.get_ai_usecases()
- get_ai_usecases_by_name(self, name: str, inventory_id: str = None, exact_match: bool = None) List[AIUsecaseUtilities]
Retrieve AI use cases by name.
Search for AI use cases based on the provided name. If exact_match is True, only exact matches are returned; otherwise, partial matches are included. An optional inventory_id can limit the search to a specific inventory.
- Parameters:
name (str): The name or partial name of the AI use case.
inventory_id (str, optional): The ID to filter by inventory. Defaults to None.
exact_match (bool, optional): If True, returns only exact matches. Defaults to False.
- Returns:
List[AIUsecaseUtilities]: A list of matching AI use cases.
- Examples:
# Search for AI use cases with names that contain 'sample' usecases = client.assets.get_ai_usecases_by_name(name='sample') # Search for AI use cases with an exact name match usecases = client.assets.get_ai_usecases_by_name(name='sample', exact_match=True)
- create_model_usecase(self, catalog_id: str = None, name: str = None, description: str = None) ModelUsecaseUtilities
Warning
ibm_aigov_facts_client.factsheet.assets.Assets.create_model_usecase
is deprecated. This method will be removed in a future release.It is due to new generalized method available to cover models and prompts. Useclient.assets.create_ai_usecase()
instead.Returns WKC Model usecase
- Parameters:
catalog_id (str) – Catalog ID where this model usecase needs to create.
name (str) – Name of model usecase
description (str) – (Optional) Model usecase description
- Return type:
ModelUsecaseUtilities
- Returns:
WKC Model usecase asset
Example:
>>> client.assets.create_model_usecase(catalog_id=<catalog_id>,name=<model usecase name>,description=<model usecase description>)
- get_model_usecase(self, model_usecase_id: str, catalog_id: str = None) ModelUsecaseUtilities
Warning
ibm_aigov_facts_client.factsheet.assets.Assets.get_model_usecase
is deprecated. This method will be removed in a future release.It is due to new generalized method available to cover models and prompts. Useclient.assets.get_ai_usecase()
instead.Get model usecase asset.
- Parameters:
model_usecase_id (str) – Id of the model usecase.
catalog_id (str) – Id of the catalog where model usecase is saved.
- Return type:
ModelUsecaseUtilities
The way to use me is:
>>> client.assets.get_model_usecase(model_usecase_id=<model usecase id>, catalog_id=<catalog id>)
- get_model_usecases(self, catalog_id: str = None) list
Warning
ibm_aigov_facts_client.factsheet.assets.Assets.get_model_usecases
is deprecated. This method will be removed in a future release.It is due to new generalized method available to cover models and prompts. Useclient.assets.get_ai_usecases()
instead.Returns WKC Model usecase assets
- Parameters:
catalog_id (str) – (Optional) Catalog ID where model usecase are registered. if not provided, dafault shows all model usecases in all catalogs across all accounts to which the user has access.
- Return type:
list(ModelUsecaseUtilities)
- Returns:
All WKC Model usecase assets for a catalog
Example:
>>> client.assets.get_model_usecases(catalog_id=<catalog_id>) >>> client.assets.get_model_usecases()
- list_model_usecases(self, catalog_id: str = None) list
Warning
ibm_aigov_facts_client.factsheet.assets.Assets.list_model_usecases
is deprecated. This method will be removed in a future release.Useclient.assets.get_model_usecases()
instead.Returns WKC Model usecase assets
- Parameters:
catalog_id (str) – Catalog ID where registered model usecase. if not provided, dafault shows all model usecases in all catalogs across all accounts to which the user has access.
- Returns:
All WKC Model usecase assets for a catalog
- Return type:
list
Example:
>>> client.assets.list_model_usecases(catalog_id=<catalog_id>) >>> client.assets.list_model_usecases()