ai2_kit.core.artifact module#
- class ai2_kit.core.artifact.Artifact(*, key: Optional[str] = None, executor: Optional[str] = None, url: str, format: Optional[str] = None, includes: Optional[str] = None, attrs: dict = {})[source]#
Bases:
BaseModel
- attrs: dict#
- executor: Optional[str]#
- format: Optional[str]#
- includes: Optional[str]#
- key: Optional[str]#
- classmethod of(url: str, key: Optional[str] = None, executor: Optional[str] = None, includes: Optional[str] = None, attrs: Optional[dict] = None, format: Optional[str] = None)[source]#
Create an Artifact instance. Use this instead of __init__ to avoid type error of pydantic
- to_dict() ArtifactDict [source]#
Convert to a dict representation. Use this when you need to run a remote function call as pydantic model is not pickleable.
- url: str#
- class ai2_kit.core.artifact.ArtifactDict#
Bases:
TypedDict
A dict representation of Artifact. Use this when you need to run a remote function call as pydantic model is not pickleable.
referrer is not included in this dict as it is not pickleable.
- attrs: dict#
- executor: Optional[str]#
- format: Optional[str]#
- includes: Optional[str]#
- key: Optional[str]#
- url: str#