Skip to content

Structure config

StructureConfig

Bases: BaseStructureConfig

Source code in griptape/config/structure_config.py
@define
class StructureConfig(BaseStructureConfig):
    global_drivers: StructureGlobalDriversConfig = field(
        default=Factory(lambda: StructureGlobalDriversConfig()), kw_only=True, metadata={"serializable": True}
    )
    task_memory: StructureTaskMemoryConfig = field(
        default=Factory(
            lambda self: StructureTaskMemoryConfig(
                query_engine=StructureTaskMemoryQueryEngineConfig(
                    prompt_driver=self.global_drivers.prompt_driver,
                    vector_store_driver=LocalVectorStoreDriver(embedding_driver=self.global_drivers.embedding_driver),
                ),
                extraction_engine=StructureTaskMemoryExtractionEngineConfig(
                    csv=StructureTaskMemoryExtractionEngineCsvConfig(prompt_driver=self.global_drivers.prompt_driver),
                    json=StructureTaskMemoryExtractionEngineJsonConfig(prompt_driver=self.global_drivers.prompt_driver),
                ),
                summary_engine=StructureTaskMemorySummaryEngineConfig(prompt_driver=self.global_drivers.prompt_driver),
            ),
            takes_self=True,
        ),
        kw_only=True,
        metadata={"serializable": True},
    )

global_drivers: StructureGlobalDriversConfig = field(default=Factory(lambda: StructureGlobalDriversConfig()), kw_only=True, metadata={'serializable': True}) class-attribute instance-attribute

task_memory: StructureTaskMemoryConfig = field(default=Factory(lambda self: StructureTaskMemoryConfig(query_engine=StructureTaskMemoryQueryEngineConfig(prompt_driver=self.global_drivers.prompt_driver, vector_store_driver=LocalVectorStoreDriver(embedding_driver=self.global_drivers.embedding_driver)), extraction_engine=StructureTaskMemoryExtractionEngineConfig(csv=StructureTaskMemoryExtractionEngineCsvConfig(prompt_driver=self.global_drivers.prompt_driver), json=StructureTaskMemoryExtractionEngineJsonConfig(prompt_driver=self.global_drivers.prompt_driver)), summary_engine=StructureTaskMemorySummaryEngineConfig(prompt_driver=self.global_drivers.prompt_driver)), takes_self=True), kw_only=True, metadata={'serializable': True}) class-attribute instance-attribute