Skip to content

assistant_task

AssistantTask

Bases: BaseTextInputTask

Task to run an Assistant.

Attributes:

Name Type Description
assistant_driver BaseAssistantDriver

Driver to run the Assistant.

Source code in griptape/tasks/assistant_task.py
@define
class AssistantTask(BaseTextInputTask):
    """Task to run an Assistant.

    Attributes:
        assistant_driver: Driver to run the Assistant.
    """

    assistant_driver: BaseAssistantDriver = field(kw_only=True)

    def try_run(self) -> BaseArtifact:
        return self.assistant_driver.run(self.input)

assistant_driver: BaseAssistantDriver = field(kw_only=True) class-attribute instance-attribute

try_run()

Source code in griptape/tasks/assistant_task.py
def try_run(self) -> BaseArtifact:
    return self.assistant_driver.run(self.input)