structure_run
Adapted from the Griptape AI Framework documentation.
__all__ = ['BaseStructureRunDriver']
module-attribute
Bases:
ABCAttributes
Name | Type | Description |
---|---|---|
env | dict[str, str] | Environment variables to set before running the Structure. |
Source Code in griptape/drivers/structure_run/base_structure_run_driver.py
@define class BaseStructureRunDriver(ABC): """Base class for Structure Run Drivers. Attributes: env: Environment variables to set before running the Structure. """ env: dict[str, str] = field(default=Factory(dict), kw_only=True) def run(self, *args: BaseArtifact) -> BaseArtifact: return self.try_run(*args) @abstractmethod def try_run(self, *args: BaseArtifact) -> BaseArtifact: ...
env = field(default=Factory(dict), kw_only=True)
class-attribute instance-attribute
run(*args)
Source Code in griptape/drivers/structure_run/base_structure_run_driver.py
def run(self, *args: BaseArtifact) -> BaseArtifact: return self.try_run(*args)
try_run(*args)abstractmethod
Source Code in griptape/drivers/structure_run/base_structure_run_driver.py
@abstractmethod def try_run(self, *args: BaseArtifact) -> BaseArtifact: ...
- On this page
- Attributes
- run(*args)
- try_run(*args)abstractmethod
Could this page be better? Report a problem or suggest an addition!