Skip to content

Releases: griptape-ai/griptape

v0.34.3

13 Nov 21:39
a5eb56c
Compare
Choose a tag to compare

Fixed

  • ActionsSubtask.before_run and ActionsSubtask.after_run being called twice in ToolkitTask and Tooltask.

v0.34.2

07 Nov 22:31
f9c0918
Compare
Choose a tag to compare

Fixed

  • Restore human-friendly default ImageArtifact and AudioArtifact names with file type extension.

Full Changelog: 0.34.1...0.34.2

v0.34.1

05 Nov 16:30
b1e95de
Compare
Choose a tag to compare

Added

  • WebScraperTool.text_chunker default value for max_tokens.

Fixed

  • WebScraperTool not using text_chunker override.
  • Breaking change in Chat.handle_output behavior.

v0.34.0

29 Oct 19:34
9fe2dcf
Compare
Choose a tag to compare

Added

  • griptape.configs.logging.JsonFormatter for formatting logs as JSON.
  • Request/response debug logging to all Prompt Drivers.
  • griptape.schemas.UnionField for serializing union fields.
  • BaseEventListener.flush_events() to flush events from an Event Listener.
  • Exponential backoff to BaseEventListenerDriver for retrying failed event publishing.
  • BaseTask.task_outputs to get a dictionary of all task outputs. This has been added to Workflow.context and Pipeline.context.
  • Chat.input_fn for customizing the input to the Chat utility.
  • GriptapeCloudFileManagerDriver for managing files on Griptape Cloud.
  • BaseFileManagerDriver.load_artifact() & BaseFileManagerDriver.save_artifact() for loading & saving artifacts as files.
  • Events BaseChunkEvent, TextChunkEvent, ActionChunkEvent.
  • wrapt dependency for more robust decorators.
  • BasePromptDriver.extra_params for passing extra parameters not explicitly declared by the Driver.
  • RunnableMixin which adds on_before_run and on_after_run hooks.
  • griptape.utils.with_contextvars utility for running functions with the current contextvars context.

Changed

  • BREAKING: Removed BaseEventListenerDriver.publish_event flush argument. Use BaseEventListenerDriver.flush_events() instead.
  • BREAKING: Renamed parameter driver on EventListener to event_listener_driver.
  • BREAKING: Updated EventListener.handler return value behavior.
    • If EventListener.handler returns None, the event will not be published to the event_listener_driver.
    • If EventListener.handler is None, the event will be published to the event_listener_driver as-is.
  • BREAKING: Removed CompletionChunkEvent.
  • BREAKING: Moved griptape.common.observable.observable to griptape.common.decorators.observable.
  • BREAKING: AnthropicDriversConfig no longer bundles VoyageAiEmbeddingDriver.
  • BREAKING: Removed HuggingFaceHubPromptDriver.params, use HuggingFaceHubPromptDriver.extra_params instead.
  • BREAKING: Removed HuggingFacePipelinePromptDriver.params, use HuggingFacePipelinePromptDriver.extra_params instead.
  • BREAKING: Renamed BaseTask.run to BaseTask.try_run.
  • BREAKING: Renamed BaseTask.execute to BaseTask.run.
  • BREAKING: Renamed BaseTask.can_execute to BaseTool.can_run.
  • BREAKING: Renamed BaseTool.run to BaseTool.try_run.
  • BREAKING: Renamed BaseTool.execute to BaseTool.run.
  • BREAKING: Renamed callables throughout the framework for consistency:
    • Renamed LocalStructureRunDriver.structure_factory_fn to LocalStructureRunDriver.create_structure.
    • Renamed SnowflakeSqlDriver.connection_func to SnowflakeSqlDriver.get_connection.
    • Renamed CsvLoader.formatter_fn to CsvLoader.format_row.
    • Renamed SqlLoader.formatter_fn to SqlLoader.format_row.
    • Renamed CsvExtractionEngine.system_template_generator to CsvExtractionEngine.generate_system_template.
    • Renamed CsvExtractionEngine.user_template_generator to CsvExtractionEngine.generate_user_template.
    • Renamed JsonExtractionEngine.system_template_generator to JsonExtractionEngine.generate_system_template.
    • Renamed JsonExtractionEngine.user_template_generator to JsonExtractionEngine.generate_user_template.
    • Renamed PromptResponseRagModule.generate_system_template to PromptResponseRagModule.generate_system_template.
    • Renamed PromptTask.generate_system_template to PromptTask.generate_system_template.
    • Renamed ToolkitTask.generate_assistant_subtask_template to ToolkitTask.generate_assistant_subtask_template.
    • Renamed JsonSchemaRule.template_generator to JsonSchemaRule.generate_template.
    • Renamed ToolkitTask.generate_user_subtask_template to ToolkitTask.generate_user_subtask_template.
    • Renamed TextLoaderRetrievalRagModule.process_query_output_fn to TextLoaderRetrievalRagModule.process_query_output.
    • Renamed FuturesExecutorMixin.futures_executor_fn to FuturesExecutorMixin.create_futures_executor.
    • Renamed VectorStoreTool.process_query_output_fn to VectorStoreTool.process_query_output.
    • Renamed CodeExecutionTask.run_fn to CodeExecutionTask.on_run.
    • Renamed Chat.input_fn to Chat.handle_input.
    • Renamed Chat.output_fn to Chat.handle_output.
    • Renamed EventListener.handler to EventListener.on_event.
  • Updated EventListener.handler return type to Optional[BaseEvent | dict].
  • BaseTask.parent_outputs type has changed from dict[str, str | None] to dict[str, BaseArtifact].
  • Workflow.context["parent_outputs"] type has changed from dict[str, str | None] to dict[str, BaseArtifact].
  • Pipeline.context["parent_output"] has changed type from str | None to BaseArtifact | None.
  • _DefaultsConfig.logging_config and Defaults.drivers_config are now lazily instantiated.
  • griptape.schemas.BaseSchema now uses griptape.schemas.UnionField for Union fields.
  • BaseTask.add_parent/BaseTask.add_child now only add the parent/child task to the structure if it is not already present.
  • BaseEventListener.flush_events() to flush events from an Event Listener.
  • BaseEventListener no longer requires a thread lock for batching events.
  • Updated ToolkitTask system prompt to retry/fix actions when using native tool calling.
  • Chat input now uses a slightly customized version of Rich.prompt.Prompt by default.
  • Chat output now uses Rich.print by default.
  • Chat.output_fn's now takes an optional kwarg parameter, stream.
  • Implemented SerializableMixin in Structure, BaseTask, BaseTool, and TaskMemory
  • @activity decorated functions can now accept kwargs that are defined in the activity schema.
  • Updated ToolkitTask system prompt to no longer mention memory_name and artifact_namespace.
  • Models in ToolkitTask with native tool calling no longer need to provide their final answer as Answer:.
  • EventListener.event_types will now listen on child types of any provided type.
  • Only install Tool dependencies if the Tool provides a requirements.txt and the dependencies are not already met.
  • Implemented RunnableMixin in Structure, BaseTask, and BaseTool.
  • EventBus's Event Listeners are now thread/coroutine-local. Event Listeners from the spawning thread will be automatically copied when using concurrent griptape features like Workflows.

Fixed

  • Structures not flushing events when not listening for FinishStructureRunEvent.
  • EventListener.event_types and the argument to BaseEventListenerDriver.handler being out of sync.
  • Models occasionally hallucinating memory_name and artifact_namespace into Tool schemas when using ToolkitTask.
  • Models occasionally providing overly succinct final answers when using ToolkitTask.
  • Exception getting raised in FuturesExecutorMixin.__del__.
  • Issues when using EventListener as a context manager in a multi-threaded environment.

0.33.1

11 Oct 22:19
cc4ffe5
Compare
Choose a tag to compare

Fixed

  • Pinned cohere at ~5.11.0 to resolve slow dependency resolution.
  • Missing exa-py from all extra.

0.33.0

09 Oct 19:41
91fd268
Compare
Choose a tag to compare

Added

  • Workflow.input_tasks and Workflow.output_tasks to access the input and output tasks of a Workflow.
  • Ability to pass nested list of Tasks to Structure.tasks allowing for more complex declarative Structure definitions.
  • TavilyWebSearchDriver to integrate Tavily's web search capabilities.
  • ExaWebSearchDriver to integrate Exa's web search capabilities.
  • Workflow.outputs to access the outputs of a Workflow.
  • BaseFileLoader for Loaders that load from a path.
  • BaseLoader.fetch() method for fetching data from a source.
  • BaseLoader.parse() method for parsing fetched data.
  • BaseFileManager.encoding to specify the encoding when loading and saving files.
  • BaseWebScraperDriver.extract_page() method for extracting data from an already scraped web page.
  • TextLoaderRetrievalRagModule.chunker for specifying the chunking strategy.
  • file_utils.get_mime_type utility for getting the MIME type of a file.
  • BaseRulesetDriver for loading a Ruleset from an external source.
    • LocalRulesetDriver for loading a Ruleset from a local .json file.
    • GriptapeCloudRulesetDriver for loading a Ruleset resource from Griptape Cloud.
  • Parameter alias on GriptapeCloudConversationMemoryDriver for fetching a Thread by alias.
  • Basic support for OpenAi Structured Output via OpenAiChatPromptDriver.response_format parameter.
  • Ability to pass callable to activity.schema for dynamic schema generation.

Changed

  • BREAKING: Renamed parameters on several classes to client:
    • bedrock_client on AmazonBedrockCohereEmbeddingDriver.
    • bedrock_client on AmazonBedrockCohereEmbeddingDriver.
    • bedrock_client on AmazonBedrockTitanEmbeddingDriver.
    • bedrock_client on AmazonBedrockImageGenerationDriver.
    • bedrock_client on AmazonBedrockImageQueryDriver.
    • bedrock_client on AmazonBedrockPromptDriver.
    • sagemaker_client on AmazonSageMakerJumpstartEmbeddingDriver.
    • sagemaker_client on AmazonSageMakerJumpstartPromptDriver.
    • sqs_client on AmazonSqsEventListenerDriver.
    • iotdata_client on AwsIotCoreEventListenerDriver.
    • s3_client on AmazonS3FileManagerDriver.
    • s3_client on AwsS3Tool.
    • iam_client on AwsIamTool.
    • pusher_client on PusherEventListenerDriver.
    • mq on MarqoVectorStoreDriver.
    • model_client on GooglePromptDriver.
    • model_client on GoogleTokenizer.
  • BREAKING: Renamed parameter pipe on HuggingFacePipelinePromptDriver to pipeline.
  • BREAKING: Removed BaseFileManager.default_loader and BaseFileManager.loaders.
  • BREAKING: Loaders no longer chunk data, use a Chunker to chunk the data.
  • BREAKING: Removed fileutils.load_file and fileutils.load_files.
  • BREAKING: Removed loaders-dataframe and loaders-audio extras as they are no longer needed.
  • BREKING: TextLoader, PdfLoader, ImageLoader, and AudioLoader now take a str | PathLike instead of bytes. Passing bytes is still supported but deprecated.
  • BREAKING: Removed DataframeLoader.
  • BREAKING: Update pypdf dependency to ^5.0.1.
  • BREAKING: Update redis dependency to ^5.1.0.
  • BREAKING: Remove torch extra from transformers dependency. This must be installed separately.
  • BREAKING: Split BaseExtractionEngine.extract into extract_text and extract_artifacts for consistency with BaseSummaryEngine.
  • BREAKING: BaseExtractionEngine no longer catches exceptions and returns ErrorArtifacts.
  • BREAKING: JsonExtractionEngine.template_schema is now required.
  • BREAKING: CsvExtractionEngine.column_names is now required.
  • BREAKING: RenamedRuleMixin.all_rulesets to RuleMixin.rulesets.
  • BREAKING: Renamed GriptapeCloudKnowledgeBaseVectorStoreDriver to GriptapeCloudVectorStoreDriver.
  • BREAKING: OpenAiChatPromptDriver.response_format is now a dict instead of a str.
  • MarkdownifyWebScraperDriver.DEFAULT_EXCLUDE_TAGS now includes media/blob-like HTML tags
  • StructureRunTask now inherits from PromptTask.
  • Several places where API clients are initialized are now lazy loaded.
  • BaseVectorStoreDriver.upsert_text_artifacts now returns a list or dictionary of upserted vector ids.
  • LocalFileManagerDriver.workdir is now optional.
  • filetype is now a core dependency.
  • FileManagerTool now uses filetype for more accurate file type detection.
  • BaseFileLoader.load_file() will now either return a TextArtifact or a BlobArtifact depending on whether BaseFileManager.encoding is set.
  • Structure.output's type is now BaseArtifact and raises an exception if the output is None.
  • JsonExtractionEngine.extract_artifacts now returns a ListArtifact[JsonArtifact].
  • CsvExtractionEngine.extract_artifacts now returns a ListArtifact[CsvRowArtifact].
  • Remove manifest.yml requirements for custom tool creation.

Fixed

  • Anthropic native Tool calling.
  • Empty ActionsSubtask.thought being logged.
  • RuleMixin no longer prevents setting rulesets and rules at the same time.
  • PromptTask will merge in its Structure's Rulesets and Rules.
  • PromptTask not checking whether Structure was set before building Prompt Stack.
  • BaseTask.full_context context being empty when not connected to a Structure.

0.32.0

18 Sep 15:41
191dacb
Compare
Choose a tag to compare

Added

  • BaseArtifact.to_bytes() method to convert an Artifact's value to bytes.
  • BlobArtifact.base64 property for converting a BlobArtifact's value to a base64 string.
  • CsvLoader/SqlLoader/DataframeLoader formatter_fn field for customizing how SQL results are formatted into TextArtifacts.
  • AzureOpenAiTextToSpeechDriver.
  • JsonSchemaRule for instructing the LLM to output a JSON object that conforms to a schema.
  • Ability to use Event Listeners as Context Managers for temporarily setting the Event Bus listeners.
  • Ability to use Drivers Configs as Context Managers for temporarily setting the default Drivers.
  • Generic type support to ListArtifact.
  • Iteration support to ListArtifact.

Changed

  • BREAKING: Removed CsvRowArtifact. Use TextArtifact instead.
  • BREAKING: Removed MediaArtifact, use ImageArtifact or AudioArtifact instead.
  • BREAKING: CsvLoader, DataframeLoader, and SqlLoader now return list[TextArtifact].
  • BREAKING: Removed ImageArtifact.media_type.
  • BREAKING: Removed AudioArtifact.media_type.
  • BREAKING: Removed BlobArtifact.dir_name.
  • BREAKING: Moved ImageArtifact.prompt and ImageArtifact.model into ImageArtifact.meta.
  • BREAKING: ImageArtifact.format is now required.
  • BREAKING: Removed the __all__ declaration from the griptape.mixins module.
  • Updated JsonArtifact value converter to properly handle more types.
  • AudioArtifact now subclasses BlobArtifact instead of MediaArtifact.
  • ImageArtifact now subclasses BlobArtifact instead of MediaArtifact.
  • Removed __add__ method from BaseArtifact, implemented it where necessary.

Fixed

  • Crash when passing "empty" Artifacts or no Artifacts to CohereRerankDriver.

0.31.0

04 Sep 16:31
2ba3e92
Compare
Choose a tag to compare

Added

  • Parameter meta: dict on BaseEvent.

Changed

  • BREAKING: Drivers, Loaders, and Engines now raise exceptions rather than returning ErrorArtifacts.
  • BREAKING: Parameter driver on BaseConversationMemory renamed to conversation_memory_driver.
  • BREAKING: BaseConversationMemory.add_to_prompt_stack now takes a prompt_driver parameter.
  • 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].
  • Defaults.drivers_config.conversation_memory_driver now defaults to LocalConversationMemoryDriver instead of None.
  • CsvRowArtifact.to_text() now includes the header.

Fixed

  • Parsing streaming response with some OpenAI compatible services.
  • Issue in PromptSummaryEngine if there are no artifacts during recursive summarization.
  • Issue in GooglePromptDriver using Tools with no schema.
  • Missing maxTokens inference parameter in AmazonBedrockPromptDriver.
  • Incorrect model in OpenAiDriverConfig's text_to_speech_driver.
  • Crash when using CohereRerankDriver with CsvRowArtifacts.

0.30.2

26 Aug 21:25
457259d
Compare
Choose a tag to compare

Fixed

  • Ensure thread safety when publishing events by adding a thread lock to batch operations in BaseEventListenerDriver.
  • FileManagerTool failing to save Artifacts created by ExtractionTool with a CsvExtractionEngine.

0.30.1

21 Aug 23:21
d576619
Compare
Choose a tag to compare

Fixed

  • CsvExtractionEngine not using provided Rulesets.
  • Docs examples for Extraction Engines not properly passing in schemas.