diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c18e59b0..cfb97f0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **BREAKING**: `BaseConversationMemoryDriver.load` now returns `tuple[list[Run], dict]`. This represents the runs and metadata. - **BREAKING**: `BaseConversationMemoryDriver.store` now takes `runs: list[Run]` and `metadata: dict` as input. - **BREAKING**: Parameter `file_path` on `LocalConversationMemoryDriver` renamed to `persist_file` and is now type `Optional[str]`. +- **BREAKING**: Removed the `__all__` declaration from the `griptape.mixins` module. - `Defaults.drivers_config.conversation_memory_driver` now defaults to `LocalConversationMemoryDriver` instead of `None`. - `CsvRowArtifact.to_text()` now includes the header. diff --git a/griptape/artifacts/action_artifact.py b/griptape/artifacts/action_artifact.py index a10653078..9772bbbab 100644 --- a/griptape/artifacts/action_artifact.py +++ b/griptape/artifacts/action_artifact.py @@ -5,7 +5,7 @@ from attrs import define, field from griptape.artifacts import BaseArtifact -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.common import ToolAction diff --git a/griptape/artifacts/base_artifact.py b/griptape/artifacts/base_artifact.py index d1e0d34f4..82a0bbd23 100644 --- a/griptape/artifacts/base_artifact.py +++ b/griptape/artifacts/base_artifact.py @@ -7,7 +7,7 @@ from attrs import Factory, define, field -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.common import Reference diff --git a/griptape/common/actions/base_action.py b/griptape/common/actions/base_action.py index abd9abcd4..99c443248 100644 --- a/griptape/common/actions/base_action.py +++ b/griptape/common/actions/base_action.py @@ -1,6 +1,6 @@ from abc import ABC -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin class BaseAction(SerializableMixin, ABC): ... diff --git a/griptape/common/prompt_stack/contents/base_message_content.py b/griptape/common/prompt_stack/contents/base_message_content.py index a0b10fd05..cbd16811b 100644 --- a/griptape/common/prompt_stack/contents/base_message_content.py +++ b/griptape/common/prompt_stack/contents/base_message_content.py @@ -5,7 +5,7 @@ from attrs import define, field -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from collections.abc import Sequence diff --git a/griptape/common/prompt_stack/messages/base_message.py b/griptape/common/prompt_stack/messages/base_message.py index 15bcd9c73..6a0d9522e 100644 --- a/griptape/common/prompt_stack/messages/base_message.py +++ b/griptape/common/prompt_stack/messages/base_message.py @@ -5,7 +5,7 @@ from attrs import Factory, define, field -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.common import BaseDeltaMessageContent, BaseMessageContent diff --git a/griptape/common/prompt_stack/prompt_stack.py b/griptape/common/prompt_stack/prompt_stack.py index c9f71aa20..6d8dfde75 100644 --- a/griptape/common/prompt_stack/prompt_stack.py +++ b/griptape/common/prompt_stack/prompt_stack.py @@ -22,7 +22,7 @@ Message, TextMessageContent, ) -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.tools import BaseTool diff --git a/griptape/common/reference.py b/griptape/common/reference.py index 66a62b83f..637c68318 100644 --- a/griptape/common/reference.py +++ b/griptape/common/reference.py @@ -5,7 +5,7 @@ from attrs import Factory, define, field -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin @define(kw_only=True) diff --git a/griptape/configs/drivers/base_drivers_config.py b/griptape/configs/drivers/base_drivers_config.py index 456249634..0d9f476ab 100644 --- a/griptape/configs/drivers/base_drivers_config.py +++ b/griptape/configs/drivers/base_drivers_config.py @@ -5,7 +5,7 @@ from attrs import define, field -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin from griptape.utils.decorators import lazy_property if TYPE_CHECKING: diff --git a/griptape/drivers/audio_transcription/base_audio_transcription_driver.py b/griptape/drivers/audio_transcription/base_audio_transcription_driver.py index ae46c474c..a79d390d3 100644 --- a/griptape/drivers/audio_transcription/base_audio_transcription_driver.py +++ b/griptape/drivers/audio_transcription/base_audio_transcription_driver.py @@ -6,7 +6,8 @@ from attrs import define, field from griptape.events import EventBus, FinishAudioTranscriptionEvent, StartAudioTranscriptionEvent -from griptape.mixins import ExponentialBackoffMixin, SerializableMixin +from griptape.mixins.exponential_backoff_mixin import ExponentialBackoffMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts import AudioArtifact, TextArtifact diff --git a/griptape/drivers/embedding/base_embedding_driver.py b/griptape/drivers/embedding/base_embedding_driver.py index 8998f00e5..2a3533728 100644 --- a/griptape/drivers/embedding/base_embedding_driver.py +++ b/griptape/drivers/embedding/base_embedding_driver.py @@ -7,7 +7,8 @@ from attrs import define, field from griptape.chunkers import BaseChunker, TextChunker -from griptape.mixins import ExponentialBackoffMixin, SerializableMixin +from griptape.mixins.exponential_backoff_mixin import ExponentialBackoffMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts import TextArtifact diff --git a/griptape/drivers/event_listener/base_event_listener_driver.py b/griptape/drivers/event_listener/base_event_listener_driver.py index 75bdc9f75..f9cb55dc9 100644 --- a/griptape/drivers/event_listener/base_event_listener_driver.py +++ b/griptape/drivers/event_listener/base_event_listener_driver.py @@ -7,7 +7,7 @@ from attrs import Factory, define, field -from griptape.mixins import FuturesExecutorMixin +from griptape.mixins.futures_executor_mixin import FuturesExecutorMixin if TYPE_CHECKING: from griptape.events import BaseEvent diff --git a/griptape/drivers/image_generation/base_image_generation_driver.py b/griptape/drivers/image_generation/base_image_generation_driver.py index 8dfca5945..8c10ce12d 100644 --- a/griptape/drivers/image_generation/base_image_generation_driver.py +++ b/griptape/drivers/image_generation/base_image_generation_driver.py @@ -6,7 +6,8 @@ from attrs import define, field from griptape.events import EventBus, FinishImageGenerationEvent, StartImageGenerationEvent -from griptape.mixins import ExponentialBackoffMixin, SerializableMixin +from griptape.mixins.exponential_backoff_mixin import ExponentialBackoffMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts import ImageArtifact diff --git a/griptape/drivers/image_generation_model/base_image_generation_model_driver.py b/griptape/drivers/image_generation_model/base_image_generation_model_driver.py index 9acc62890..9dc5a9b6b 100644 --- a/griptape/drivers/image_generation_model/base_image_generation_model_driver.py +++ b/griptape/drivers/image_generation_model/base_image_generation_model_driver.py @@ -5,7 +5,7 @@ from attrs import define -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts import ImageArtifact diff --git a/griptape/drivers/image_query/base_image_query_driver.py b/griptape/drivers/image_query/base_image_query_driver.py index 28c571328..ecfe0ca6e 100644 --- a/griptape/drivers/image_query/base_image_query_driver.py +++ b/griptape/drivers/image_query/base_image_query_driver.py @@ -6,7 +6,8 @@ from attrs import define, field from griptape.events import EventBus, FinishImageQueryEvent, StartImageQueryEvent -from griptape.mixins import ExponentialBackoffMixin, SerializableMixin +from griptape.mixins.exponential_backoff_mixin import ExponentialBackoffMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts import ImageArtifact, TextArtifact diff --git a/griptape/drivers/image_query_model/base_image_query_model_driver.py b/griptape/drivers/image_query_model/base_image_query_model_driver.py index 5f60367d5..ac97ee3c1 100644 --- a/griptape/drivers/image_query_model/base_image_query_model_driver.py +++ b/griptape/drivers/image_query_model/base_image_query_model_driver.py @@ -5,7 +5,7 @@ from attrs import define -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts import ImageArtifact, TextArtifact diff --git a/griptape/drivers/memory/conversation/base_conversation_memory_driver.py b/griptape/drivers/memory/conversation/base_conversation_memory_driver.py index ea0a171f2..c9963b1eb 100644 --- a/griptape/drivers/memory/conversation/base_conversation_memory_driver.py +++ b/griptape/drivers/memory/conversation/base_conversation_memory_driver.py @@ -3,7 +3,7 @@ from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Any -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.memory.structure import Run diff --git a/griptape/drivers/prompt/base_prompt_driver.py b/griptape/drivers/prompt/base_prompt_driver.py index c07980c9e..778b6f474 100644 --- a/griptape/drivers/prompt/base_prompt_driver.py +++ b/griptape/drivers/prompt/base_prompt_driver.py @@ -17,7 +17,8 @@ observable, ) from griptape.events import CompletionChunkEvent, EventBus, FinishPromptEvent, StartPromptEvent -from griptape.mixins import ExponentialBackoffMixin, SerializableMixin +from griptape.mixins.exponential_backoff_mixin import ExponentialBackoffMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from collections.abc import Iterator diff --git a/griptape/drivers/text_to_speech/base_text_to_speech_driver.py b/griptape/drivers/text_to_speech/base_text_to_speech_driver.py index cb11cc498..b2ad8bc3e 100644 --- a/griptape/drivers/text_to_speech/base_text_to_speech_driver.py +++ b/griptape/drivers/text_to_speech/base_text_to_speech_driver.py @@ -8,7 +8,8 @@ from griptape.events import EventBus from griptape.events.finish_text_to_speech_event import FinishTextToSpeechEvent from griptape.events.start_text_to_speech_event import StartTextToSpeechEvent -from griptape.mixins import ExponentialBackoffMixin, SerializableMixin +from griptape.mixins.exponential_backoff_mixin import ExponentialBackoffMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts.audio_artifact import AudioArtifact diff --git a/griptape/drivers/vector/base_vector_store_driver.py b/griptape/drivers/vector/base_vector_store_driver.py index 2abb29c3f..50810752e 100644 --- a/griptape/drivers/vector/base_vector_store_driver.py +++ b/griptape/drivers/vector/base_vector_store_driver.py @@ -9,7 +9,8 @@ from griptape import utils from griptape.artifacts import BaseArtifact, ListArtifact, TextArtifact -from griptape.mixins import FuturesExecutorMixin, SerializableMixin +from griptape.mixins.futures_executor_mixin import FuturesExecutorMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.drivers import BaseEmbeddingDriver diff --git a/griptape/engines/rag/modules/base_rag_module.py b/griptape/engines/rag/modules/base_rag_module.py index 668b3aced..30c66f27c 100644 --- a/griptape/engines/rag/modules/base_rag_module.py +++ b/griptape/engines/rag/modules/base_rag_module.py @@ -7,7 +7,7 @@ from attrs import Factory, define, field from griptape.common import Message, PromptStack -from griptape.mixins import FuturesExecutorMixin +from griptape.mixins.futures_executor_mixin import FuturesExecutorMixin if TYPE_CHECKING: from griptape.engines.rag import RagContext diff --git a/griptape/engines/rag/modules/response/prompt_response_rag_module.py b/griptape/engines/rag/modules/response/prompt_response_rag_module.py index 78dfba8f4..fbb8ed7e6 100644 --- a/griptape/engines/rag/modules/response/prompt_response_rag_module.py +++ b/griptape/engines/rag/modules/response/prompt_response_rag_module.py @@ -7,7 +7,7 @@ from griptape.artifacts.text_artifact import TextArtifact from griptape.configs import Defaults from griptape.engines.rag.modules import BaseResponseRagModule -from griptape.mixins import RuleMixin +from griptape.mixins.rule_mixin import RuleMixin from griptape.utils import J2 if TYPE_CHECKING: diff --git a/griptape/engines/rag/rag_context.py b/griptape/engines/rag/rag_context.py index 3dbfc6834..b48fb3acb 100644 --- a/griptape/engines/rag/rag_context.py +++ b/griptape/engines/rag/rag_context.py @@ -5,7 +5,7 @@ from attrs import define, field from griptape import utils -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts import BaseArtifact, TextArtifact diff --git a/griptape/engines/rag/stages/base_rag_stage.py b/griptape/engines/rag/stages/base_rag_stage.py index 6a28551b4..dfa2e6002 100644 --- a/griptape/engines/rag/stages/base_rag_stage.py +++ b/griptape/engines/rag/stages/base_rag_stage.py @@ -5,7 +5,7 @@ from griptape.engines.rag import RagContext from griptape.engines.rag.modules import BaseRagModule -from griptape.mixins import FuturesExecutorMixin +from griptape.mixins.futures_executor_mixin import FuturesExecutorMixin @define(kw_only=True) diff --git a/griptape/events/base_event.py b/griptape/events/base_event.py index 61443107e..f008c9cd8 100644 --- a/griptape/events/base_event.py +++ b/griptape/events/base_event.py @@ -7,7 +7,7 @@ from attrs import Factory, define, field -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin @define diff --git a/griptape/loaders/base_loader.py b/griptape/loaders/base_loader.py index 525b4df0a..14f9aa10f 100644 --- a/griptape/loaders/base_loader.py +++ b/griptape/loaders/base_loader.py @@ -5,7 +5,7 @@ from attrs import define, field -from griptape.mixins import FuturesExecutorMixin +from griptape.mixins.futures_executor_mixin import FuturesExecutorMixin from griptape.utils.futures import execute_futures_dict from griptape.utils.hash import bytes_to_hash, str_to_hash diff --git a/griptape/memory/meta/base_meta_entry.py b/griptape/memory/meta/base_meta_entry.py index c1b253317..d27e79d35 100644 --- a/griptape/memory/meta/base_meta_entry.py +++ b/griptape/memory/meta/base_meta_entry.py @@ -4,7 +4,7 @@ from attrs import define -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin @define diff --git a/griptape/memory/structure/base_conversation_memory.py b/griptape/memory/structure/base_conversation_memory.py index 92f5bd942..e2095b460 100644 --- a/griptape/memory/structure/base_conversation_memory.py +++ b/griptape/memory/structure/base_conversation_memory.py @@ -7,7 +7,7 @@ from griptape.common import PromptStack from griptape.configs import Defaults -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin from griptape.utils import dict_merge if TYPE_CHECKING: diff --git a/griptape/memory/structure/run.py b/griptape/memory/structure/run.py index 5d2a182ad..4be0b587c 100644 --- a/griptape/memory/structure/run.py +++ b/griptape/memory/structure/run.py @@ -5,7 +5,7 @@ from attrs import Factory, define, field -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin if TYPE_CHECKING: from griptape.artifacts import BaseArtifact diff --git a/griptape/memory/task/task_memory.py b/griptape/memory/task/task_memory.py index c7f12b233..1aa60dba3 100644 --- a/griptape/memory/task/task_memory.py +++ b/griptape/memory/task/task_memory.py @@ -7,7 +7,7 @@ from griptape.artifacts import BaseArtifact, BlobArtifact, ErrorArtifact, InfoArtifact, ListArtifact, TextArtifact from griptape.memory.meta import ActionSubtaskMetaEntry from griptape.memory.task.storage import BlobArtifactStorage, TextArtifactStorage -from griptape.mixins import ActivityMixin +from griptape.mixins.activity_mixin import ActivityMixin if TYPE_CHECKING: from griptape.memory.task.storage import BaseArtifactStorage diff --git a/griptape/mixins/__init__.py b/griptape/mixins/__init__.py index 32e00dd8b..e69de29bb 100644 --- a/griptape/mixins/__init__.py +++ b/griptape/mixins/__init__.py @@ -1,19 +0,0 @@ -from .activity_mixin import ActivityMixin -from .exponential_backoff_mixin import ExponentialBackoffMixin -from .actions_subtask_origin_mixin import ActionsSubtaskOriginMixin -from .rule_mixin import RuleMixin -from .serializable_mixin import SerializableMixin -from .media_artifact_file_output_mixin import BlobArtifactFileOutputMixin -from .futures_executor_mixin import FuturesExecutorMixin -from .singleton_mixin import SingletonMixin - -__all__ = [ - "ActivityMixin", - "ExponentialBackoffMixin", - "ActionsSubtaskOriginMixin", - "RuleMixin", - "BlobArtifactFileOutputMixin", - "SerializableMixin", - "FuturesExecutorMixin", - "SingletonMixin", -] diff --git a/griptape/schemas/base_schema.py b/griptape/schemas/base_schema.py index f25e8870b..9290c6098 100644 --- a/griptape/schemas/base_schema.py +++ b/griptape/schemas/base_schema.py @@ -25,7 +25,7 @@ def from_attrs_cls(cls, attrs_cls: type) -> type: """ from marshmallow import post_load - from griptape.mixins import SerializableMixin + from griptape.mixins.serializable_mixin import SerializableMixin class SubSchema(cls): @post_load diff --git a/griptape/structures/workflow.py b/griptape/structures/workflow.py index f1e1ec86b..cd7bef07d 100644 --- a/griptape/structures/workflow.py +++ b/griptape/structures/workflow.py @@ -9,7 +9,7 @@ from griptape.artifacts import ErrorArtifact from griptape.common import observable from griptape.memory.structure import Run -from griptape.mixins import FuturesExecutorMixin +from griptape.mixins.futures_executor_mixin import FuturesExecutorMixin from griptape.structures import Structure if TYPE_CHECKING: diff --git a/griptape/tasks/actions_subtask.py b/griptape/tasks/actions_subtask.py index 7cdb5d4de..38a96a603 100644 --- a/griptape/tasks/actions_subtask.py +++ b/griptape/tasks/actions_subtask.py @@ -13,7 +13,7 @@ from griptape.common import ToolAction from griptape.configs import Defaults from griptape.events import EventBus, FinishActionsSubtaskEvent, StartActionsSubtaskEvent -from griptape.mixins import ActionsSubtaskOriginMixin +from griptape.mixins.actions_subtask_origin_mixin import ActionsSubtaskOriginMixin from griptape.tasks import BaseTask from griptape.utils import remove_null_values_in_dict_recursively diff --git a/griptape/tasks/base_audio_generation_task.py b/griptape/tasks/base_audio_generation_task.py index 519a1a59a..fae217d54 100644 --- a/griptape/tasks/base_audio_generation_task.py +++ b/griptape/tasks/base_audio_generation_task.py @@ -6,7 +6,8 @@ from attrs import define from griptape.configs import Defaults -from griptape.mixins import BlobArtifactFileOutputMixin, RuleMixin +from griptape.mixins.media_artifact_file_output_mixin import BlobArtifactFileOutputMixin +from griptape.mixins.rule_mixin import RuleMixin from griptape.tasks import BaseTask logger = logging.getLogger(Defaults.logging_config.logger_name) diff --git a/griptape/tasks/base_audio_input_task.py b/griptape/tasks/base_audio_input_task.py index e39f70fcd..8a834db56 100644 --- a/griptape/tasks/base_audio_input_task.py +++ b/griptape/tasks/base_audio_input_task.py @@ -8,7 +8,7 @@ from griptape.artifacts.audio_artifact import AudioArtifact from griptape.configs import Defaults -from griptape.mixins import RuleMixin +from griptape.mixins.rule_mixin import RuleMixin from griptape.tasks import BaseTask logger = logging.getLogger(Defaults.logging_config.logger_name) diff --git a/griptape/tasks/base_image_generation_task.py b/griptape/tasks/base_image_generation_task.py index f0c1f0e7e..bd36d0080 100644 --- a/griptape/tasks/base_image_generation_task.py +++ b/griptape/tasks/base_image_generation_task.py @@ -10,7 +10,8 @@ from griptape.configs import Defaults from griptape.loaders import ImageLoader -from griptape.mixins import BlobArtifactFileOutputMixin, RuleMixin +from griptape.mixins.media_artifact_file_output_mixin import BlobArtifactFileOutputMixin +from griptape.mixins.rule_mixin import RuleMixin from griptape.rules import Rule, Ruleset from griptape.tasks import BaseTask diff --git a/griptape/tasks/base_task.py b/griptape/tasks/base_task.py index 535b3a92d..2c6743035 100644 --- a/griptape/tasks/base_task.py +++ b/griptape/tasks/base_task.py @@ -11,7 +11,7 @@ from griptape.artifacts import ErrorArtifact from griptape.configs import Defaults from griptape.events import EventBus, FinishTaskEvent, StartTaskEvent -from griptape.mixins import FuturesExecutorMixin +from griptape.mixins.futures_executor_mixin import FuturesExecutorMixin if TYPE_CHECKING: from griptape.artifacts import BaseArtifact diff --git a/griptape/tasks/prompt_task.py b/griptape/tasks/prompt_task.py index 9c0060039..d2dd20b36 100644 --- a/griptape/tasks/prompt_task.py +++ b/griptape/tasks/prompt_task.py @@ -8,7 +8,7 @@ from griptape.artifacts import BaseArtifact, ListArtifact, TextArtifact from griptape.common import PromptStack from griptape.configs import Defaults -from griptape.mixins import RuleMixin +from griptape.mixins.rule_mixin import RuleMixin from griptape.tasks import BaseTask from griptape.utils import J2 diff --git a/griptape/tasks/tool_task.py b/griptape/tasks/tool_task.py index 6dd5000b3..2dcb796d8 100644 --- a/griptape/tasks/tool_task.py +++ b/griptape/tasks/tool_task.py @@ -8,7 +8,7 @@ from griptape import utils from griptape.artifacts import BaseArtifact, ErrorArtifact, InfoArtifact, ListArtifact -from griptape.mixins import ActionsSubtaskOriginMixin +from griptape.mixins.actions_subtask_origin_mixin import ActionsSubtaskOriginMixin from griptape.tasks import ActionsSubtask, PromptTask from griptape.utils import J2 diff --git a/griptape/tasks/toolkit_task.py b/griptape/tasks/toolkit_task.py index ff1194440..ed9860c66 100644 --- a/griptape/tasks/toolkit_task.py +++ b/griptape/tasks/toolkit_task.py @@ -8,7 +8,7 @@ from griptape import utils from griptape.artifacts import ActionArtifact, BaseArtifact, ErrorArtifact, ListArtifact, TextArtifact from griptape.common import PromptStack, ToolAction -from griptape.mixins import ActionsSubtaskOriginMixin +from griptape.mixins.actions_subtask_origin_mixin import ActionsSubtaskOriginMixin from griptape.tasks import ActionsSubtask, PromptTask from griptape.utils import J2 diff --git a/griptape/tools/base_image_generation_tool.py b/griptape/tools/base_image_generation_tool.py index 487c6d1ba..ee1c37b6d 100644 --- a/griptape/tools/base_image_generation_tool.py +++ b/griptape/tools/base_image_generation_tool.py @@ -1,6 +1,6 @@ from attrs import define -from griptape.mixins import BlobArtifactFileOutputMixin +from griptape.mixins.media_artifact_file_output_mixin import BlobArtifactFileOutputMixin from griptape.tools import BaseTool diff --git a/griptape/tools/base_tool.py b/griptape/tools/base_tool.py index 7c6785649..b846ec40b 100644 --- a/griptape/tools/base_tool.py +++ b/griptape/tools/base_tool.py @@ -16,7 +16,7 @@ from griptape.artifacts import BaseArtifact, ErrorArtifact, InfoArtifact, TextArtifact from griptape.common import observable -from griptape.mixins import ActivityMixin +from griptape.mixins.activity_mixin import ActivityMixin if TYPE_CHECKING: from griptape.common import ToolAction diff --git a/griptape/tools/extraction/tool.py b/griptape/tools/extraction/tool.py index 1f6d06b80..3cb46a670 100644 --- a/griptape/tools/extraction/tool.py +++ b/griptape/tools/extraction/tool.py @@ -6,7 +6,7 @@ from schema import Literal, Or, Schema from griptape.artifacts import ErrorArtifact, ListArtifact, TextArtifact -from griptape.mixins import RuleMixin +from griptape.mixins.rule_mixin import RuleMixin from griptape.tools import BaseTool from griptape.utils.decorators import activity diff --git a/griptape/tools/text_to_speech/tool.py b/griptape/tools/text_to_speech/tool.py index 95a42d0ae..ea4982029 100644 --- a/griptape/tools/text_to_speech/tool.py +++ b/griptape/tools/text_to_speech/tool.py @@ -5,7 +5,7 @@ from attrs import define, field from schema import Literal, Schema -from griptape.mixins import BlobArtifactFileOutputMixin +from griptape.mixins.media_artifact_file_output_mixin import BlobArtifactFileOutputMixin from griptape.tools import BaseTool from griptape.utils.decorators import activity diff --git a/tests/mocks/mock_futures_executor.py b/tests/mocks/mock_futures_executor.py index cbbf84560..30dcfc21e 100644 --- a/tests/mocks/mock_futures_executor.py +++ b/tests/mocks/mock_futures_executor.py @@ -1,4 +1,4 @@ -from griptape.mixins import FuturesExecutorMixin +from griptape.mixins.futures_executor_mixin import FuturesExecutorMixin class MockFuturesExecutor(FuturesExecutorMixin): ... diff --git a/tests/mocks/mock_serializable.py b/tests/mocks/mock_serializable.py index b40ae25b4..9a838f9b5 100644 --- a/tests/mocks/mock_serializable.py +++ b/tests/mocks/mock_serializable.py @@ -4,7 +4,7 @@ from attrs import define, field -from griptape.mixins import SerializableMixin +from griptape.mixins.serializable_mixin import SerializableMixin @define diff --git a/tests/unit/mixins/test_image_artifact_file_output_mixin.py b/tests/unit/mixins/test_image_artifact_file_output_mixin.py index 03c44e081..cf124da39 100644 --- a/tests/unit/mixins/test_image_artifact_file_output_mixin.py +++ b/tests/unit/mixins/test_image_artifact_file_output_mixin.py @@ -4,7 +4,7 @@ import pytest from griptape.artifacts import ImageArtifact -from griptape.mixins import BlobArtifactFileOutputMixin +from griptape.mixins.media_artifact_file_output_mixin import BlobArtifactFileOutputMixin class TestMediaArtifactFileOutputMixin: diff --git a/tests/unit/mixins/test_rule_mixin.py b/tests/unit/mixins/test_rule_mixin.py index e88014566..393d721a3 100644 --- a/tests/unit/mixins/test_rule_mixin.py +++ b/tests/unit/mixins/test_rule_mixin.py @@ -1,6 +1,6 @@ import pytest -from griptape.mixins import RuleMixin +from griptape.mixins.rule_mixin import RuleMixin from griptape.rules import Rule, Ruleset from griptape.structures import Agent from griptape.tasks import PromptTask