Skip to content

Prompt stack input schema

PromptStackInputSchema

Bases: BaseSchema

Source code in griptape/griptape/schemas/utils/prompt_stack_input_schema.py
class PromptStackInputSchema(BaseSchema):
    content = fields.Str()
    role = fields.Str()

    @post_load
    def make_obj(self, data, **kwargs):
        from griptape.utils.prompt_stack import PromptStack

        return PromptStack.Input(**data)

content = fields.Str() class-attribute instance-attribute

role = fields.Str() class-attribute instance-attribute

make_obj(data, **kwargs)

Source code in griptape/griptape/schemas/utils/prompt_stack_input_schema.py
@post_load
def make_obj(self, data, **kwargs):
    from griptape.utils.prompt_stack import PromptStack

    return PromptStack.Input(**data)