Releases: griptape-ai/griptape
Releases · griptape-ai/griptape
v1.1.1
v1.1.0
Added
PromptTask.conversation_memory
for setting the Conversation Memory on a Prompt Task.Structure.conversation_memory_strategy
for setting whether Conversation Memory Runs should be created on a per-Structure or per-Task basis. Default isper_structure
.Structure.conversation_memory_strategy
for setting whether Conversation Memory Runs should be created on a per-Structure or per-Task basis. Default isStructure.ConversationMemoryStrategy.PER_STRUCTURE
.BranchTask
for selecting which Tasks (if any) to run based on a condition.- Support for
BranchTask
inStructureVisualizer
. EvalEngine
for evaluating the performance of an LLM's output against a given input.BaseFileLoader.save()
method for saving an Artifact to a destination.Structure.run_stream()
for streaming Events from a Structure as an iterator.- Support for
GenericMessageContent
inAnthropicPromptDriver
andAmazonBedrockPromptDriver
. - Validators to
Agent
initialization.
Changed
- Rulesets can now be serialized and deserialized.
ToolkitTask
now serializes itstools
field.PromptTask.prompt_driver
is now serialized.PromptTask
can now do everything aToolkitTask
can do.- Loosten
numpy
s version constraint to>=1.26.4,<3
.
Fixed
- Exception when calling
Structure.to_json()
after it has run. Agent
unintentionally modifyingstream
for all Prompt Drivers.StructureVisualizer.base_url
for setting the base URL on the url generated byStructureVisualizer.to_url()
.StructureVisualizer.query_params
for setting query parameters on the url generated byStructureVisualizer.to_url()
.- Parsing
ActionCallDeltaMessageContent
s with empty stringpartial_input
s. Stream
util not properly propagating thread contextvars.ValueError
withDuckDuckGoWebSearchDriver
.Agent.stream
overridingAgent.prompt_driver.stream
even whenAgent.prompt_driver
is explicitly provided.
Deprecated
- Soft deprecated
ToolkitTask
.PromptTask
is a drop-in replacement.
v1.0.2
Fixed
- Exception when calling
Structure.to_json()
after it has run. Agent
unintentionally modifyingstream
for all Prompt Drivers.StructureVisualizer.base_url
for setting the base URL on the url generated byStructureVisualizer.to_url()
.StructureVisualizer.query_params
for setting query parameters on the url generated byStructureVisualizer.to_url()
.- Parsing
ActionCallDeltaMessageContent
s with empty stringpartial_input
s.
v1.0.1
Fixed
- Prompt Driver image input doc example not rendering
v1.0.0
Added
TrafilaturaWebScraperDriver.no_ssl
parameter to disable SSL verification. Defaults toFalse
.CsvExtractionEngine.format_header
parameter to format the header row.PromptStack.from_artifact
factory method for creating a Prompt Stack with a user message from an Artifact.OpenAiChatPromptDriver.parallel_tool_calls
parameter for toggling parallel tool calling. Defaults toTrue
.AssistantTask
for running Assistants in Structures.GriptapeCloudAssistantDriver
for interacting with Griptape Cloud's Assistant API.OpenAiAssistantDriver
for interacting with OpenAI's Assistant API.GriptapeCloudToolTool
for running Griptape Cloud hosted Tools.JsonLoader
for loading and parsing JSON files.StructureVisualizer.build_node_id
field for customizing the node ID.- Support for Python
3.13
.
Changed
- BREAKING: Removed
stringcase
anddocker
from core dependencies.ComputerTool
will now install these on the fly. - BREAKING: Renamed
BaseTask.State.EXECUTING
toBaseTask.State.RUNNING
. - BREAKING: Renamed
BaseTask.is_executing()
toBaseTask.is_running()
. - BREAKING: Renamed
Structure.is_executing()
toStructure.is_running()
. - BREAKING: Removed ability to pass bytes to
BaseFileLoader.fetch
. - BREAKING: Updated
CsvExtractionEngine.format_row
to format rows as comma-separated values instead of newline-separated key-value pairs. - BREAKING: Removed all
ImageQueryDriver
s, usePromptDriver
s instead. - BREAKING: Removed
ImageQueryTask
, usePromptTask
instead. - BREAKING: Updated
ImageQueryTool.image_query_driver
toImageQueryTool.prompt_driver
. - BREAKING: Updated
numpy
to~2.0.2
andpandas
to^2.2
. - BREAKING: Renamed
StructureRunTask.driver
toStructureRunTask.structure_run_driver
. - BREAKING: Renamed
StructureRunTool.driver
toStructureRunTool.structure_run_driver
. - BREAKING: Moved the following Google Tools to the Griptape Google Extension:
GoogleCalendarTool
GoogleDocsTool
GoogleDriveTool
GoogleGmailTool
- BREAKING: Moved the following AWS Tools to the Griptape AWS Extension:
AwsCliTool
AwsIamTool
AwsPricingTool
AwsS3Tool
- BREAKING: Moved the
OpenWeatherTool
to the Griptape Open Weather Extension - BREAKING: Removed
GriptapeCloudKnowledgeBaseTool
. Use a RAG Engine withGriptapeCloudVectorStoreDriver
instead. - BREAKING: Removed redundant Engines, use their respective Drivers instead.
- Removed
ImageQueryEngine
, useImageQueryDriver
s instead. - Removed
InpaintingImageGenerationEngine
, useImageGenerationDriver
s instead. - Removed
OutpaintingImageGenerationEngine
, useImageGenerationDriver
s instead. - Removed
VariationImageGenerationEngine
, useImageGenerationDriver
s instead. - Removed
PromptImageGenerationEngine
, useImageGenerationDriver
s instead. - Removed
ImageGenerationEngine
, useImageGenerationDriver
s instead. - Removed
AudioTranscriptionEngine
, useAudioTranscriptionDriver
s instead. - Removed
TextToSpeechEngine
, useTextToSpeechDriver
s instead.
- Removed
- BREAKING: Tools that previously took Engines now take their respective Drivers.
- Updated
AudioTranscriptionTool.engine
toAudioTranscriptionTool.audio_transcription_driver
. - Updated
TextToSpeechTool.engine
toTextToSpeechTool.text_to_speech_driver
. - Updated
ImageQueryTool.image_query_engine
toImageQueryTool.image_query_driver
. - Updated
InpaintingImageGenerationTool.engine
toInpaintingImageGenerationTool.image_generation_driver
. - Updated
OutpaintingImageGenerationTool.engine
toOutpaintingImageGenerationTool.image_generation_driver
. - Updated
VariationImageGenerationTool.engine
toVariationImageGenerationTool.image_generation_driver
. - Updated
PromptImageGenerationTool.engine
toPromptImageGenerationTool.image_generation_driver
.
- Updated
- BREAKING: Tasks that previously took Engines now take their respective Drivers.
- Updated
AudioTranscriptionTask.audio_transcription_engine
toAudioTranscriptionTask.audio_transcription_driver
. - Updated
TextToSpeechTask.text_to_speech_engine
toTextToSpeechTask.text_to_speech_driver
. - Updated
ImageQueryTask.image_query_engine
toImageQueryTask.image_query_driver
. - Updated
InpaintingImageGenerationTask.image_query_engine
toInpaintingImageGenerationTask.image_generation_driver
. - Updated
OutpaintingImageGenerationTask.image_query_engine
toOutpaintingImageGenerationTask.image_generation_driver
. - Updated
VariationImageGenerationTask.image_query_engine
toVariationImageGenerationTask.image_generation_driver
. - Updated
PromptImageGenerationTask.image_query_engine
toPromptImageGenerationTask.image_generation_driver
.
- Updated
- BREAKING: Renamed
BaseImageGenerationTask.all_negative_rulesets
toBaseImageGenerationTask.negative_rulesets
. - File Manager Driver path logic has been improved.
LocalFileManagerDriver.workdir
can now be a relative path or absolute path. Relative paths will be prefixed with the current working directory.AmazonS3FileManagerDriver.workdir
can now be a relative path or absolute path. Relative paths will be prefixed with/
.GriptapeCloudFileManagerDriver.workdir
can now be a relative path or absolute path. Relative paths will be prefixed with/
.- Paths passed to
LocalFileManagerDriver
can now be relative or absolute. Absolute paths will be used as-is.
BasePromptDriver.run
can now accept an Artifact in addition to a Prompt Stack.- Improved
CsvExtractionEngine
prompts. - Tweaked
PromptResponseRagModule
system prompt to yield answers more consistently. - Removed
azure-core
andazure-storage-blob
dependencies. GriptapeCloudFileManagerDriver
no longer requiresdrivers-file-manager-griptape-cloud
extra.TrafilaturaWebScraperDriver
no longer setsno_ssl
toTrue
by default.AmazonBedrockPromptDriver
not working without settingmax_tokens
.BaseImageGenerationTask
no longer prevents settingnegative_rulesets
andnegative_rules
at the same time.StructureVisualizer
now rendersStructureRunTask
s with aLocalStructureRunDriver
.StructureVisualizer
to titlecase the node IDs to avoid Mermaid.js reserved keywords.- Updated Tokenizer model-to-max tokens lookup logic for more flexible matching.
BaseTool
now logs Tool activity exceptions after catching them.BaseTool
now deep copies activity params.
Fixed
- Use of deprecated
pkg_resources
inBaseTool
. - Error when serializing
JsonArtifact
s. GriptapeCloudVectorStoreDriver
not pullingapi_key
fromGT_CLOUD_API_KEY
environment variable.MarqoVectorStoreDriver.query
failing wheninclude_metadata
isTrue
.with_contextvars
not properly wrapping functions in some cases.- Crash when calling
ToolkitTask.run()
directly. @activity
decorator overwriting injected kwargs with default values asNone
.- Multiple calls to
RuleMixin.rulesets
resulting in duplicate Rulesets. BaseTool
incorrectly checking for empty values.
v0.34.3
Fixed
ActionsSubtask.before_run
andActionsSubtask.after_run
being called twice inToolkitTask
andTooltask
.
v0.34.2
Fixed
- Restore human-friendly default
ImageArtifact
andAudioArtifact
names with file type extension.
Full Changelog: 0.34.1...0.34.2
v0.34.1
v0.34.0
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 toWorkflow.context
andPipeline.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 addson_before_run
andon_after_run
hooks.griptape.utils.with_contextvars
utility for running functions with the currentcontextvars
context.
Changed
- BREAKING: Removed
BaseEventListenerDriver.publish_event
flush
argument. UseBaseEventListenerDriver.flush_events()
instead. - BREAKING: Renamed parameter
driver
onEventListener
toevent_listener_driver
. - BREAKING: Updated
EventListener.handler
return value behavior.- If
EventListener.handler
returnsNone
, the event will not be published to theevent_listener_driver
. - If
EventListener.handler
is None, the event will be published to theevent_listener_driver
as-is.
- If
- BREAKING: Removed
CompletionChunkEvent
. - BREAKING: Moved
griptape.common.observable.observable
togriptape.common.decorators.observable
. - BREAKING:
AnthropicDriversConfig
no longer bundlesVoyageAiEmbeddingDriver
. - BREAKING: Removed
HuggingFaceHubPromptDriver.params
, useHuggingFaceHubPromptDriver.extra_params
instead. - BREAKING: Removed
HuggingFacePipelinePromptDriver.params
, useHuggingFacePipelinePromptDriver.extra_params
instead. - BREAKING: Renamed
BaseTask.run
toBaseTask.try_run
. - BREAKING: Renamed
BaseTask.execute
toBaseTask.run
. - BREAKING: Renamed
BaseTask.can_execute
toBaseTool.can_run
. - BREAKING: Renamed
BaseTool.run
toBaseTool.try_run
. - BREAKING: Renamed
BaseTool.execute
toBaseTool.run
. - BREAKING: Renamed callables throughout the framework for consistency:
- Renamed
LocalStructureRunDriver.structure_factory_fn
toLocalStructureRunDriver.create_structure
. - Renamed
SnowflakeSqlDriver.connection_func
toSnowflakeSqlDriver.get_connection
. - Renamed
CsvLoader.formatter_fn
toCsvLoader.format_row
. - Renamed
SqlLoader.formatter_fn
toSqlLoader.format_row
. - Renamed
CsvExtractionEngine.system_template_generator
toCsvExtractionEngine.generate_system_template
. - Renamed
CsvExtractionEngine.user_template_generator
toCsvExtractionEngine.generate_user_template
. - Renamed
JsonExtractionEngine.system_template_generator
toJsonExtractionEngine.generate_system_template
. - Renamed
JsonExtractionEngine.user_template_generator
toJsonExtractionEngine.generate_user_template
. - Renamed
PromptResponseRagModule.generate_system_template
toPromptResponseRagModule.generate_system_template
. - Renamed
PromptTask.generate_system_template
toPromptTask.generate_system_template
. - Renamed
ToolkitTask.generate_assistant_subtask_template
toToolkitTask.generate_assistant_subtask_template
. - Renamed
JsonSchemaRule.template_generator
toJsonSchemaRule.generate_template
. - Renamed
ToolkitTask.generate_user_subtask_template
toToolkitTask.generate_user_subtask_template
. - Renamed
TextLoaderRetrievalRagModule.process_query_output_fn
toTextLoaderRetrievalRagModule.process_query_output
. - Renamed
FuturesExecutorMixin.futures_executor_fn
toFuturesExecutorMixin.create_futures_executor
. - Renamed
VectorStoreTool.process_query_output_fn
toVectorStoreTool.process_query_output
. - Renamed
CodeExecutionTask.run_fn
toCodeExecutionTask.on_run
. - Renamed
Chat.input_fn
toChat.handle_input
. - Renamed
Chat.output_fn
toChat.handle_output
. - Renamed
EventListener.handler
toEventListener.on_event
.
- Renamed
- Updated
EventListener.handler
return type toOptional[BaseEvent | dict]
. BaseTask.parent_outputs
type has changed fromdict[str, str | None]
todict[str, BaseArtifact]
.Workflow.context["parent_outputs"]
type has changed fromdict[str, str | None]
todict[str, BaseArtifact]
.Pipeline.context["parent_output"]
has changed type fromstr | None
toBaseArtifact | None
._DefaultsConfig.logging_config
andDefaults.drivers_config
are now lazily instantiated.griptape.schemas.BaseSchema
now usesgriptape.schemas.UnionField
forUnion
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 ofRich.prompt.Prompt
by default.Chat
output now usesRich.print
by default.Chat.output_fn
's now takes an optional kwarg parameter,stream
.- Implemented
SerializableMixin
inStructure
,BaseTask
,BaseTool
, andTaskMemory
@activity
decorated functions can now accept kwargs that are defined in the activity schema.- Updated
ToolkitTask
system prompt to no longer mentionmemory_name
andartifact_namespace
. - Models in
ToolkitTask
with native tool calling no longer need to provide their final answer asAnswer:
. 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
inStructure
,BaseTask
, andBaseTool
. 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 toBaseEventListenerDriver.handler
being out of sync.- Models occasionally hallucinating
memory_name
andartifact_namespace
into Tool schemas when usingToolkitTask
. - 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.
v0.33.1
Fixed
- Pinned
cohere
at~5.11.0
to resolve slow dependency resolution. - Missing
exa-py
fromall
extra.