All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
BaseTask.add_child()
to add a child task to a parent task.BaseTask.add_children()
to add multiple child tasks to a parent task.BaseTask.add_parent()
to add a parent task to a child task.BaseTask.add_parents()
to add multiple parent tasks to a child task.Structure.resolve_relationships()
to resolve asymmetrically defined parent/child relationships. In other words, if a parent declares a child, but the child does not declare the parent, the parent will automatically be added as a parent of the child when running this method. The method is invoked automatically byStructure.before_run()
.CohereEmbeddingDriver
for using Cohere's embeddings API.CohereStructureConfig
for providing Structures with quick Cohere configuration.AmazonSageMakerJumpstartPromptDriver.inference_component_name
for setting theInferenceComponentName
parameter when invoking an endpoint.AmazonSageMakerJumpstartEmbeddingDriver.inference_component_name
for setting theInferenceComponentName
parameter when invoking an endpoint.AmazonSageMakerJumpstartEmbeddingDriver.custom_attributes
for setting custom attributes when invoking an endpoint.ToolkitTask.response_stop_sequence
for overriding the default Chain of Thought stop sequence.griptape.utils.StructureVisualizer
for visualizing Workflow structures with Mermaid.jsBaseTask.parents_outputs
to get the textual output of all parent tasks.BaseTask.parents_output_text
to get a concatenated string of all parent tasks' outputs.parents_output_text
to Workflow context.OllamaPromptModelDriver
for using models with Ollama.
- BREAKING:
Workflow
no longer modifies task relationships when adding tasks viatasks
init param,add_tasks()
oradd_task()
. Previously, adding a task would automatically add the previously added task as its parent. Existing code that relies on this behavior will need to be updated to explicitly add parent/child relationships using the API offered byBaseTask
. - BREAKING: Removed
AmazonBedrockPromptDriver.prompt_model_driver
as it is no longer needed with theAmazonBedrockPromptDriver
Converse API implementation. - BREAKING: Removed
BedrockClaudePromptModelDriver
. - BREAKING: Removed
BedrockJurassicPromptModelDriver
. - BREAKING: Removed
BedrockLlamaPromptModelDriver
. - BREAKING: Removed
BedrockTitanPromptModelDriver
. - BREAKING: Removed
BedrockClaudeTokenizer
, useSimpleTokenizer
instead. - BREAKING: Removed
BedrockJurassicTokenizer
, useSimpleTokenizer
instead. - BREAKING: Removed
BedrockLlamaTokenizer
, useSimpleTokenizer
instead. - BREAKING: Removed
BedrockTitanTokenizer
, useSimpleTokenizer
instead. - BREAKING: Removed
OpenAiChatCompletionPromptDriver
as it uses the legacy OpenAi Completions API. - BREAKING: Removed
BasePromptDriver.count_tokens()
. - BREAKING: Removed
BasePromptDriver.max_output_tokens()
. - BREAKING: Moved/renamed
PromptStack.add_to_conversation_memory
toBaseConversationMemory.add_to_prompt_stack
. - BREAKING: Moved
griptape.constants.RESPONSE_STOP_SEQUENCE
toToolkitTask
. - BREAKING: Renamed
AmazonSagemakerPromptDriver
toAmazonSageMakerJumpstartPromptDriver
. - BREAKING: Removed
SagemakerFalconPromptModelDriver
, useAmazonSageMakerJumpstartPromptDriver
instead. - BREAKING: Removed
SagemakerLlamaPromptModelDriver
, useAmazonSageMakerJumpstartPromptDriver
instead. - BREAKING: Renamed
AmazonSagemakerEmbeddingDriver
toAmazonSageMakerJumpstartEmbeddingDriver
. - BREAKING: Removed
SagemakerHuggingfaceEmbeddingModelDriver
, useAmazonSageMakerJumpstartEmbeddingDriver
instead. - BREAKING: Removed
SagemakerTensorflowHubEmbeddingModelDriver
, useAmazonSageMakerJumpstartEmbeddingDriver
instead. - BREAKING:
AmazonSageMakerJumpstartPromptDriver.model
parameter, which gets passed toSageMakerRuntime.Client.invoke_endpoint
asEndpointName
, is now renamed toAmazonSageMakerPromptDriver.endpoint
. - BREAKING: Removed parameter
template_generator
onPromptSummaryEngine
and added parameterssystem_template_generator
anduser_template_generator
. - BREAKING: Removed template
engines/summary/prompt_summary.j2
and added templatesengines/summary/system.j2
andengines/summary/user.j2
. ToolkitTask.RESPONSE_STOP_SEQUENCE
is now only added when usingToolkitTask
.- Updated Prompt Drivers to use
BasePromptDriver.max_tokens
instead of usingBasePromptDriver.max_output_tokens()
. - Improved error message when
GriptapeCloudKnowledgeBaseClient
does not have a description set. - Updated
AmazonBedrockPromptDriver
to use Converse API. Structure.before_run()
now automatically resolves asymmetrically defined parent/child relationships using the newStructure.resolve_relationships()
.- Updated
HuggingFaceHubPromptDriver
to usetransformers
'sapply_chat_template
. - Updated
HuggingFacePipelinePromptDriver
to use chat features oftransformers.TextGenerationPipeline
. - Updated
CoherePromptDriver
to use Cohere's latest SDK. - Moved Task reset logic for all Structures to
Structure.before_run
. - Updated default prompt templates for
PromptSummaryEngine
. - Updated template
templates/tasks/tool_task/system.j2
.
Workflow.insert_task()
no longer inserts duplicate tasks when given multiple parent tasks.- Performance issue in
OpenAiChatPromptDriver
when extracting unused rate-limiting headers. - Streaming not working when using deprecated
Structure.stream
field. - Raw Tool output being lost when being executed by ActionsSubtask.
- Re-order Workflow tasks on every task execution wave.
- Web Loader to catch Exceptions and properly return an ErrorArtifact.
- Conversation Memory entry only added if
output_task.output
is notNone
on allStructures
TextArtifacts
contained inListArtifact
returned byWebSearch.search
to properly formatted stringified JSON.- Structure run args not being set immediately.
- Input and output logging in BaseAudioInputTasks and BaseAudioGenerationTasks
AzureOpenAiStructureConfig
for providing Structures with all Azure OpenAI Driver configuration.AzureOpenAiVisionImageQueryDriver
to support queries on images using Azure's OpenAI Vision models.AudioLoader
for loading audio content into anAudioArtifact
.AudioTranscriptionTask
andAudioTranscriptionClient
for transcribing audio content in Structures.OpenAiAudioTranscriptionDriver
for integration with OpenAI's speech-to-text models, including Whisper.- Parameter
env
toBaseStructureRunDriver
to set environment variables for a Structure Run. PusherEventListenerDriver
to enable sending of framework events over a Pusher WebSocket.- Parameter
output
onStructure
as a convenience foroutput_task.output
- BREAKING: Updated OpenAI-based image query drivers to remove Vision from the name.
- BREAKING:
off_prompt
now defaults toFalse
on all Tools, making Task Memory something that must be explicitly opted into. - BREAKING: Removed
StructureConfig.global_drivers
. Pass Drivers directly to the Structure Config instead. - BREAKING: Removed
StructureConfig.task_memory
in favor of configuring directly on the Structure. - BREAKING: Updated OpenAI-based image query drivers to remove Vision from the name.
- BREAKING:
off_prompt
now defaults toFalse
on all Tools, making Task Memory something that must be explicitly opted into. - BREAKING:
AmazonSageMakerPromptDriver.model
parameter, which gets passed toSageMakerRuntime.Client.invoke_endpoint
asEndpointName
, is now renamed toAmazonSageMakerPromptDriver.endpoint
. - BREAKING:
AmazonSageMakerPromptDriver.model
parameter is now optional being passed toSageMakerRuntime.Client.invoke_endpoint
asInferenceComponentName
(instead ofEndpointName
). - BREAKING:
SageMakerLlamaPromptModelDriver
modified to exclusively support the Llama 3 Instruct model deployed via SageMaker JumpStart. (Support for Llama 2 models has been removed.) - Simplified custom Task Memory configurations by making several
TextArtifactStorage
Engines optional. - Default the value of
azure_deployment
on all Azure Drivers to the model the Driver is using. - Field
azure_ad_token
on all Azure Drivers is no longer serializable. - Default standard OpenAI and Azure OpenAI image query model to
gpt-4o
. - Error message to be more helpful when importing optional dependencies.
- Extra fields being excluded when using
SerializableMixin.from_dict
. - Validation of
max_tokens
< 0 onBaseChunker
- Honor
namespace
inRedisVectorStoreDriver.query()
. - Correctly set the
meta
,score
, andvector
fields of query result returned fromRedisVectorStoreDriver.query()
. - Standardize behavior between omitted and empty actions list when initializing
ActionsSubtask
.
- Optional event batching on Event Listener Drivers.
id
field to all events.
- Default behavior of Event Listener Drivers to batch events.
- Default behavior of OpenAiStructureConfig to utilize
gpt-4o
for prompt_driver.
list_files_from_disk
activity toFileManager
Tool.- Support for Drivers in
EventListener
. AmazonSqsEventListenerDriver
for sending events to an Amazon SQS queue.AwsIotCoreEventListenerDriver
for sending events to a topic on AWS IoT Core.GriptapeCloudEventListenerDriver
for sending events to Griptape Cloud.WebhookEventListenerDriver
for sending events to a webhook.BaseFileManagerDriver
to abstract file management operations.LocalFileManagerDriver
for managing files on the local file system.- Optional
BaseLoader.encoding
field. BlobLoader
for loading arbitrary binary data as aBlobArtifact
.model
field toStartPromptEvent
andFinishPromptEvent
.input_task_input
andinput_task_output
fields toStartStructureRunEvent
.output_task_input
andoutput_task_output
fields toFinishStructureRunEvent
.AmazonS3FileManagerDriver
for managing files on Amazon S3.MediaArtifact
as a base class forImageArtifact
and future media Artifacts.- Optional
exception
field toErrorArtifact
. StructureRunClient
for running other Structures via a Tool.StructureRunTask
for running Structures as a Task from within another Structure.GriptapeCloudStructureRunDriver
for running Structures in Griptape Cloud.LocalStructureRunDriver
for running Structures in the same run-time environment as the code that is running the Structure.
- BREAKING: Secret fields (ex: api_key) removed from serialized Drivers.
- BREAKING: Remove
FileLoader
. - BREAKING:
CsvLoader
no longer acceptsstr
file paths as a source. It will now accept the content of the CSV file as astr
orbytes
object. - BREAKING:
PdfLoader
no longer acceptsstr
file content,Path
file paths orIO
objects as sources. Instead, it will only accept the content of the PDF file as abytes
object. - BREAKING:
TextLoader
no longer acceptsPath
file paths as a source. It will now accept the content of the text file as astr
orbytes
object. - BREAKING:
FileManager.default_loader
is nowNone
by default. - BREAKING Bumped
pinecone
from^2
to^3
. - BREAKING: Removed
workdir
,loaders
,default_loader
, andsave_file_encoding
fields fromFileManager
and addedfile_manager_driver
. - BREAKING: Removed
mime_type
field fromImageArtifact
.mime_type
is now a property constructed using the Artifact type andformat
field. - Improved RAG performance in
VectorQueryEngine
. - Moved Griptape Docs to this repository.
- Updated
EventListener.handler
's behavior so that the return value will be passed to theEventListenerDriver.try_publish_event_payload
'sevent_payload
parameter.
- Type hint for parameter
azure_ad_token_provider
on Azure OpenAI drivers toOptional[Callable[[], str]]
. - Missing parameters
azure_ad_token
andazure_ad_token_provider
on the default client forAzureOpenAiCompletionPromptDriver
.
- Fixed FileManager.load_files_from_disk schema.
- Fixed boto3 type-checking stub dependency.
- Use
schema
instead ofjsonschema
for JSON validation.
- Every subtask in
ToolkitTask
can now execute multiple actions in parallel. - Added
BaseActionSubtaskEvent.subtask_actions
. - Support for
text-embedding-3-small
andtext-embedding-3-large
models. GooglePromptDriver
andGoogleTokenizer
for use withgemini-pro
.GoogleEmbeddingDriver
for use withembedding-001
.GoogleStructureConfig
for providing Structures with Google Prompt and Embedding Driver configuration.- Support for
claude-3-opus
,claude-3-sonnet
, andclaude-3-haiku
inAnthropicPromptDriver
. - Support for
anthropic.claude-3-sonnet-20240229-v1:0
andanthropic.claude-3-haiku-20240307-v1:0
inBedrockClaudePromptModelDriver
. top_k
andtop_p
parameters inAnthropicPromptDriver
.- Added
AnthropicImageQueryDriver
for Claude-3 multi-modal models - Added
AmazonBedrockImageQueryDriver
along withBedrockClaudeImageQueryDriverModel
for Claude-3 in Bedrock support BaseWebScraperDriver
allowing multiple web scraping implementations.TrafilaturaWebScraperDriver
for scraping text from web pages using trafilatura.MarkdownifyWebScraperDriver
for scraping text from web pages using playwright and converting to markdown using markdownify.VoyageAiEmbeddingDriver
for use with VoyageAi's embedding models.AnthropicStructureConfig
for providing Structures with Anthropic Prompt and VoyageAi Embedding Driver configuration.
- Improved system prompt in
ToolTask
to support more use cases.
- BREAKING:
ActionSubtask
was renamed toActionsSubtask
. - BREAKING: Removed
subtask_action_name
,subtask_action_path
, andsubtask_action_input
inBaseActionSubtaskEvent
. - BREAKING:
OpenAiVisionImageQueryDriver
fieldmodel
no longer defaults togpt-4-vision-preview
and must be specified - Default model of
OpenAiEmbeddingDriver
totext-embedding-3-small
. - Default model of
OpenAiStructureConfig
totext-embedding-3-small
. BaseTextLoader
to accept aBaseChunker
.- Default model of
AmazonBedrockStructureConfig
toanthropic.claude-3-sonnet-20240229-v1:0
. AnthropicPromptDriver
andBedrockClaudePromptModelDriver
to use Anthropic's Messages API.OpenAiVisionImageQueryDriver
now has a required fieldmax_tokens
that defaults to 256
- Deprecation warnings not displaying for
Structure.prompt_driver
,Structure.embedding_driver
, andStructure.stream
. DummyException
error message not fully displaying.StructureConfig.task_memory
not defaulting to usingStructureConfig.global_drivers
by default.
- Action Subtask incorrectly raising an exception for actions without an input.
- Incorrect
GriptapeCloudKnowledgeBaseClient
's API URLs. - Issue with Tool Task system prompt causing the LLM to generate an invalid action.
- Image-to-image generation support for OpenAi Dall-E 2 model.
- Image tools support loading artifacts from memory.
AzureMongoDbVectorStoreDriver
for using CosmosDB with MongoDB vCore API.vector_path
field onMongoDbAtlasVectorStoreDriver
.LeonardoImageGenerationDriver
supports image to image generation.OpenAiStructureConfig
for providing Structures with all OpenAi Driver configuration.AmazonBedrockStructureConfig
for providing Structures with all Amazon Bedrock Driver configuration.StructureConfig
for building your own Structure configuration.JsonExtractionTask
for convenience over usingExtractionTask
with aJsonExtractionEngine
.CsvExtractionTask
for convenience over usingExtractionTask
with aCsvExtractionEngine
.OpenAiVisionImageQueryDriver
to support queries on images using OpenAI's Vision model.ImageQueryClient
allowing an Agent to make queries on images on disk or in Task Memory.ImageQueryTask
andImageQueryEngine
.
BedrockStableDiffusionImageGenerationModelDriver
request parameters for SDXLv1 (stability.stable-diffusion-xl-v1
).BedrockStableDiffusionImageGenerationModelDriver
correctly handles the CONTENT_FILTERED response case.
- BREAKING: Make
index_name
onMongoDbAtlasVectorStoreDriver
a required field. - BREAKING: Remove
create_index()
fromMarqoVectorStoreDriver
,OpenSearchVectorStoreDriver
,PineconeVectorStoreDriver
,RedisVectorStoreDriver
. - BREAKING:
ImageLoader().load()
now accepts image bytes instead of a file path. - BREAKING: Request parameters for
BedrockStableDiffusionImageGenerationModelDriver
have been updated forstability.stable-diffusion-xl-v1
. Use this over the now deprecatedstability.stable-diffusion-xl-v0
. - Deprecated
Structure.prompt_driver
in favor ofStructure.config.global_drivers.prompt_driver
. - Deprecated
Structure.embedding_driver
in favor ofStructure.config.global_drivers.embedding_driver
. - Deprecated
Structure.stream
in favor ofStructure.config.global_drivers.prompt_driver.stream
. TextSummaryTask.summary_engine
now defaults to aPromptSummaryEngine
with a Prompt Driver default ofStructure.config.global_drivers.prompt_driver
.TextQueryTask.query_engine
now defaults to aVectorQueryEngine
with a Prompt Driver default ofStructure.config.global_drivers.prompt_driver
and Vector Store Driver default ofStructure.config.global_drivers.vector_store_driver
.PromptImageGenerationTask.image_generation_engine
now defaults to aPromptImageGenerationEngine
with an Image Generation Driver default ofStructure.config.global_drivers.image_generation_driver
.VariationImageGenerationTask.image_generation_engine
now defaults to aVariationImageGenerationEngine
with an Image Generation Driver default ofStructure.config.global_drivers.image_generation_driver
.InpaintingImageGenerationTask.image_generation_engine
now defaults to anInpaintingImageGenerationEngine
with an Image Generation Driver default ofStructure.config.global_drivers.image_generation_driver
.OutpaintingImageGenerationTask.image_generation_engine
now defaults to anOutpaintingImageGenerationEngine
with an Image Generation Driver default ofStructure.config.global_drivers.image_generation_driver
.
ToolkitTask
's user subtask prompt occasionally causing the Task to end prematurely.
ToolkitTask
's user subtask prompt occasionally causing a loop with Chain of Thought.
- Updated stale dependencies [CVE-2023-50447, CVE-2024-22195, and CVE-2023-36464]
- Action Subtasks incorrectly outputting the Task input after failing to follow the ReAct prompt.
-
PromptImageGenerationEngine
for generating images from text prompts. -
VariationImageGenerationEngine
for generating variations of an input image according to a text prompt. -
InpaintingImageGenerationEngine
for modifying an input image according to a text prompt within the bounds of a mask defined by a mask image. -
OutpaintingImageGenerationEngine
for modifying an input image according to a text prompt outside the bounds of a mask defined by a mask image. -
PromptImageGenerationClient
for enabling an LLM to use thePromptImageGenerationEngine
. -
VariationImageGenerationClient
for enabling an LLM to use theVariationImageGenerationEngine
. -
InpaintingImageGenerationClient
for enabling an LLM to use theInpaintingImageGenerationEngine
. -
OutpaintingImageGenerationClient
for enabling an LLM to use theOutpaintingImageGenerationEngine
. -
OpenAiImageGenerationDriver
for use with OpenAI's image generation models. -
LeonardoImageGenerationDriver
for use with Leonoaro AI's image generation models. -
AmazonBedrockImageGenerationDriver
for use with Amazon Bedrock's image generation models; requires a Image Generation Model Driver. -
BedrockTitanImageGenerationModelDriver
for use with Amazon Bedrock's Titan image generation. -
ImageArtifact
for storing image data; used heavily by the image Engines, Tasks, and Drivers. -
ImageLoader
for loading images files intoImageArtifact
s. -
Support for all Tokenizers in
OpenAiChatPromptDriver
, enabling OpenAI drop-in clients such as Together AI. -
AmazonSageMakerJumpstartEmbeddingDriver
for using Amazon SageMaker to generate embeddings. Thanks @KaushikIyer16! -
Claude 2.1 support in
AnthropicPromptDriver
andAmazonBedrockPromptDriver
viaBedrockClaudePromptModelDriver
. -
CodeExecutionTask
for executing code as a Task without the need for an LLM. -
BedrockLlamaPromptModelDriver
for using Llama models on Amazon Bedrock.
MongoDbAtlasVectorStore
namespace not being used properly when querying.- Miscellaneous type errors throughout the codebase.
- Remove unused section from
ToolTask
system prompt template. - Structure execution args being cleared after run, preventing inspection of the Structure's
input_task
'sinput
. - Unhandled
SqlClient
exception. Thanks @michal-repo!
- BREAKING: Rename
input_template
field toinput
in Tasks that take a text input. - BREAKING: Rename
BedrockTitanEmbeddingDriver
toAmazonBedrockTitanEmbeddingDriver
. - BREAKING: Rename
AmazonBedrockStableDiffusionImageGenerationModelDriver
toBedrockStableDiffusionImageGenerationModelDriver
. - BREAKING: Rename
AmazonBedrockTitanImageGenerationModelDriver
toBedrockTitanImageGenerationModelDriver
. - BREAKING: Rename
ImageGenerationTask
toPromptImageGenerationTask
. - BREAKING: Rename
ImageGenerationEngine
toPromptImageGenerationEngine
. - BREAKING: Rename
ImageGenerationTool
toPromptImageGenerationClient
. - Improve system prompt generation with Claude 2.0.
- Improve integration test coverage.
BaseTextInputTask
to accept astr
,TextArtifact
or callable returning aTextArtifact
.