Skip to content

Releases: griptape-ai/griptape

v0.29.2

10 Dec 18:21
694232c
Compare
Choose a tag to compare

Fixed

  • Workflow threads not being properly cleaned up after completion.
  • Crash when ToolActions were missing output due to an ActionsSubtask exception.

v0.29.1

10 Dec 18:22
43f25d3
Compare
Choose a tag to compare

Changed

  • Remove BaseTextArtifact, revert CsvRowArtifact to subclass TextArtifact.

Fixed

  • Missing extra for drivers-text-to-speech-elevenlabs.

v0.29.0

10 Dec 18:25
fb5e21c
Compare
Choose a tag to compare

Added

  • Native function calling support to OpenAiChatPromptDriver, AzureOpenAiChatPromptDriver, AnthropicPromptDriver, AmazonBedrockPromptDriver, GooglePromptDriver, OllamaPromptDriver, and CoherePromptDriver.
  • OllamaEmbeddingDriver for generating embeddings with Ollama.
  • GriptapeCloudKnowledgeBaseVectorStoreDriver to query Griptape Cloud Knowledge Bases.
  • GriptapeCloudEventListenerDriver.api_key defaults to the value in the GT_CLOUD_API_KEY environment variable.
  • BaseObservabilityDriver as the base class for all Observability Drivers.
  • DummyObservabilityDriver as a no-op Observability Driver.
  • OpenTelemetryObservabilityDriver for sending observability data to an open telemetry collector or vendor.
  • GriptapeCloudObservabilityDriver for sending observability data to Griptape Cloud.
  • DatadogObservabilityDriver for sending observability data to a Datadog Agent.
  • Observability context manager for enabling observability and configuring which Observability Driver to use.
  • @observable decorator for selecting which functions/methods to provide observability for.
  • GenericArtifact for storing any data.
  • BaseTextArtifact for text-based Artifacts to subclass.
  • HuggingFacePipelineImageGenerationDriver for generating images locally with HuggingFace pipelines.
  • BaseImageGenerationPipelineDriver as the base class for drivers interfacing with HuggingFace image generation pipelines.
  • StableDiffusion3ImageGenerationPipelineDriver for local text-to-image generation using a Stable Diffusion 3 pipeline.
  • StableDiffusion3Img2ImgImageGenerationPipelineDriver for local image-to-image generation using a Stable Diffusion 3 pipeline.
  • StableDiffusion3ControlNetImageGenerationPipelineDriver for local ControlNet image generation using a Stable Diffusion 3 pipeline.

Changed

  • BREAKING: BaseVectorStoreDriver.upsert_text_artifacts optional arguments are now keyword-only arguments.
  • BREAKING: BaseVectorStoreDriver.upsert_text_artifact optional arguments are now keyword-only arguments.
  • BREAKING: BaseVectorStoreDriver.upsert_text optional arguments are now keyword-only arguments.
  • BREAKING: BaseVectorStoreDriver.does_entry_exist optional arguments are now keyword-only arguments.
  • BREAKING: BaseVectorStoreDriver.load_artifacts optional arguments are now keyword-only arguments.
  • BREAKING: BaseVectorStoreDriver.upsert_vector optional arguments are now keyword-only arguments.
  • BREAKING: BaseVectorStoreDriver.query optional arguments are now keyword-only arguments.
  • BREAKING: EventListener.publish_event's flush argument is now a keyword-only argument.
  • BREAKING: BaseEventListenerDriver.publish_event's flush argument is now a keyword-only argument.
  • BREAKING: Renamed DummyException to DummyError for pep8 naming compliance.
  • BREAKING: Migrate to sqlalchemy 2.0.
  • BREAKING: Make sqlalchemy an optional dependency.
  • BREAKING: Renamed drivers-sql-redshift to drivers-sql-amazon-redshift
  • BREAKING: Renamed drivers-prompt-huggingface extra to drivers-prompt-huggingface-hub.
  • BREAKING: Renamed drivers-vector-postgresql extra to drivers-vector-pgvector.
  • BREAKING: Update marqo dependency to ^3.7.0.
  • BREAKING: Removed drivers-sql-postgresql extra. Use drivers-sql extra and install necessary drivers (i.e. psycopg2) separately.
  • Removed unnecessary sqlalchemy-redshift dependency in drivers-sql-amazon-redshift extra.
  • Removed unnecessary transformers dependency in drivers-prompt-huggingface extra.
  • Removed unnecessary huggingface-hub dependency in drivers-prompt-huggingface-pipeline extra.
  • CsvRowArtifact now inherits from BaseTextArtifact.
  • TextArtifact now inherits from BaseTextArtifact.

Fixed

  • Parameter count for QdrantVectorStoreDriver.query now optional as per documentation.
  • Path issues on Windows with LocalFileManagerDriver and AmazonS3FileManagerDriver.

v0.28.2

10 Dec 18:22
4a29469
Compare
Choose a tag to compare

Fixed

  • Conversation Memory being incorrectly inserted into the PromptTask.prompt_stack when no system content is present.

v0.28.1

10 Dec 18:22
058d7e7
Compare
Choose a tag to compare

Fixed

  • Sending empty system content in PromptTask.
  • Throttling issues with DuckDuckGoWebSearchDriver.

v0.28.0

10 Dec 18:13
54bbe2b
Compare
Choose a tag to compare

Added

  • RagEngine is an abstraction for implementing modular RAG pipelines.
    • RagContext is a container object for passing around RAG context.
    • RAG stages:
      • QueryRagStage for parsing and expanding queries.
      • RetrievalRagStage for retrieving content.
      • ResponseRagStage for augmenting and generating outputs.
    • RAG modules:
      • Retrieval:
        • VectorStoreRetrievalRagModule for retrieving text chunks from vector stores.
        • TextLoaderRetrievalRagModule for retrieving data with text loaders in real time.
        • TextChunksRerankRagModule for re-ranking retrieved results.
      • Response:
        • MetadataBeforeResponseRagModule for appending metadata.
        • RulesetsBeforeResponseRagModule for appending rulesets.
        • PromptResponseRagModule for generating responses based on retrieved text chunks.
        • TextChunksResponseRagModule for responding with retrieved text chunks.
        • FootnotePromptResponseRagModule for responding with automatic footnotes from text chunk references.
  • RagClient tool for exposing RagEngines to LLM agents.
  • RagTask task for including RagEngines in any structure.
  • Rerank drivers:
    • CohereRerankDriver for using the Cohere rerank API.
  • utils.execute_futures_list() for executing a list of futures.
  • LocalVectorStoreDriver.persist_file for persisting vectors and chunks in a text file.
  • Entry.to_artifact() for easy vector store entry conversions into Griptape artifacts.
  • BaseVectorStoreDriver.does_entry_exist() to check if an entry exists in the vector store.
  • GoogleWebSearchDriver to web search with the Google Customsearch API.
  • DuckDuckGoWebSearchDriver to web search with the DuckDuckGo search SDK.
  • ProxyWebScraperDriver to web scrape using proxies.
  • Parameter session on AmazonBedrockStructureConfig.
  • Parameter meta on TextArtifact.
  • VectorStoreClient improvements:
    • VectorStoreClient.query_params dict for custom query params.
    • VectorStoreClient.process_query_output_fn for custom query output processing logic.
  • Parameter fail_fast to Structure.
  • BooleanArtifact for handling boolean values.
  • typos to dev dependencies to catch typos in code/docs.
  • Message for storing messages in a PromptStack. Messages consist of a role, content, and usage.
  • DeltaMessage for storing partial messages in a PromptStack. Multiple DeltaMessage can be combined to form a Message.
  • TextMessageContent for storing textual content in a Message.
  • ImageMessageContent for storing image content in a Message.
  • Support for adding TextArtifacts, ImageArtifacts, and ListArtifacts to PromptStack.
  • Support for image inputs to OpenAiChatPromptDriver, AzureOpenAiChatPromptDriver, AmazonBedrockPromptDriver, AnthropicPromptDriver, and GooglePromptDriver.
  • Input/output token usage metrics to all Prompt Drivers.
  • FinishPromptEvent.input_token_count and FinishPromptEvent.output_token_count.
  • Support for storing Artifacts as inputs/outputs in Conversation Memory Runs.
  • Agent.input for passing Artifacts as input.
  • Support for PromptTasks to take TextArtifacts, ImageArtifacts, and ListArtifacts as input.
  • Parameters sort_key and sort_key_value on AmazonDynamoDbConversationMemoryDriver for tables with sort keys.
  • Reference for supporting artifact citations in loaders and RAG engine modules.

Changed

  • BREAKING: Moved/renamed griptape.utils.PromptStack to griptape.common.PromptStack.
  • BREAKING: Renamed PromptStack.inputs to PromptStack.messages.
  • BREAKING: Moved PromptStack.USER_ROLE, PromptStack.ASSISTANT_ROLE, and PromptStack.SYSTEM_ROLE to Message.
  • BREAKING: Updated return type of PromptDriver.try_run from TextArtifact to Message.
  • BREAKING: Updated return type of PromptDriver.try_stream from Iterator[TextArtifact] to Iterator[DeltaMessage].
  • BREAKING: Removed BasePromptEvent.token_count in favor of FinishPromptEvent.input_token_count and FinishPromptEvent.output_token_count.
  • BREAKING: Removed StartPromptEvent.prompt. Use StartPromptEvent.prompt_stack instead.
  • BREAKING: Removed Agent.input_template in favor of Agent.input.
  • BREAKING: BasePromptDriver.run now returns a Message instead of a TextArtifact. For compatibility, Message.value contains the Message's Artifact value
  • BREAKING: BaseVectorStoreDriver.upsert_text_artifact() and BaseVectorStoreDriver.upsert_text() use artifact/string values to generate vector_id if it wasn't implicitly passed. This change ensures that we don't generate embeddings for the same content every time.
  • BREAKING: Removed VectorQueryEngine in favor of RagEngine.
  • BREAKING: Removed TextQueryTask in favor of RagTask.
  • BREAKING: TextArtifactStorage now requires vector_store_driver and rag_engine in place of vector_query_engine.
  • BREAKING: Moved load_artifacts() from BaseQueryEngine to BaseVectorStoreDriver.
  • BREAKING: Merged BaseVectorStoreDriver.QueryResult into BaseVectorStoreDriver.Entry.
  • BREAKING: Replaced query_engine with vector_store_driver in VectorStoreClient.
  • BREAKING: removed parameters google_api_lang, google_api_key, google_api_search_id, google_api_country on WebSearch in favor of web_search_driver.
  • BREAKING: removed VectorStoreClient.top_n and VectorStoreClient.namespace in favor of VectorStoreClient.query_params.
  • BREAKING: All futures_executor fields renamed to futures_executor_fn and now accept callables instead of futures; wrapped all future submit calls with the with block to address future executor shutdown issues.
  • GriptapeCloudKnowledgeBaseClient migrated to /search api.
  • Default Prompt Driver model in GoogleStructureConfig to gemini-1.5-pro.

Fixed

  • CoherePromptDriver to properly handle empty history.
  • StructureVisualizer.to_url() by wrapping task IDs in single quotes.

v0.27.2

10 Dec 18:13
6d5feef
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.27.0...0.27.2

v0.27.0

10 Dec 18:12
b0e781c
Compare
Choose a tag to compare

Added

  • 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 by Structure.before_run().
  • CohereEmbeddingDriver for using Cohere's embeddings API.
  • CohereStructureConfig for providing Structures with quick Cohere configuration.
  • AmazonSageMakerJumpstartPromptDriver.inference_component_name for setting the InferenceComponentName parameter when invoking an endpoint.
  • AmazonSageMakerJumpstartEmbeddingDriver.inference_component_name for setting the InferenceComponentName 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.js
  • BaseTask.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.
  • Parameter output on Structure as a convenience for output_task.output

Changed

  • BREAKING: Workflow no longer modifies task relationships when adding tasks via tasks init param, add_tasks() or add_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 by BaseTask.
  • BREAKING: Removed AmazonBedrockPromptDriver.prompt_model_driver as it is no longer needed with the AmazonBedrockPromptDriver Converse API implementation.
  • BREAKING: Removed BedrockClaudePromptModelDriver.
  • BREAKING: Removed BedrockJurassicPromptModelDriver.
  • BREAKING: Removed BedrockLlamaPromptModelDriver.
  • BREAKING: Removed BedrockTitanPromptModelDriver.
  • BREAKING: Removed BedrockClaudeTokenizer, use SimpleTokenizer instead.
  • BREAKING: Removed BedrockJurassicTokenizer, use SimpleTokenizer instead.
  • BREAKING: Removed BedrockLlamaTokenizer, use SimpleTokenizer instead.
  • BREAKING: Removed BedrockTitanTokenizer, use SimpleTokenizer 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 to BaseConversationMemory.add_to_prompt_stack.
  • BREAKING: Moved griptape.constants.RESPONSE_STOP_SEQUENCE to ToolkitTask.
  • BREAKING: Renamed AmazonSagemakerPromptDriver to AmazonSageMakerJumpstartPromptDriver.
  • BREAKING: Removed SagemakerFalconPromptModelDriver, use AmazonSageMakerJumpstartPromptDriver instead.
  • BREAKING: Removed SagemakerLlamaPromptModelDriver, use AmazonSageMakerJumpstartPromptDriver instead.
  • BREAKING: Renamed AmazonSagemakerEmbeddingDriver to AmazonSageMakerJumpstartEmbeddingDriver.
  • BREAKING: Removed SagemakerHuggingfaceEmbeddingModelDriver, use AmazonSageMakerJumpstartEmbeddingDriver instead.
  • BREAKING: Removed SagemakerTensorflowHubEmbeddingModelDriver, use AmazonSageMakerJumpstartEmbeddingDriver instead.
  • BREAKING: AmazonSageMakerJumpstartPromptDriver.model parameter, which gets passed to SageMakerRuntime.Client.invoke_endpoint as EndpointName, is now renamed to AmazonSageMakerPromptDriver.endpoint.
  • BREAKING: Removed parameter template_generator on PromptSummaryEngine and added parameters system_template_generator and user_template_generator.
  • BREAKING: Removed template engines/summary/prompt_summary.j2 and added templates engines/summary/system.j2 and engines/summary/user.j2.
  • ToolkitTask.RESPONSE_STOP_SEQUENCE is now only added when using ToolkitTask.
  • Updated Prompt Drivers to use BasePromptDriver.max_tokens instead of using BasePromptDriver.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 new Structure.resolve_relationships().
  • Updated HuggingFaceHubPromptDriver to use transformers's apply_chat_template.
  • Updated HuggingFacePipelinePromptDriver to use chat features of transformers.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.

Fixed

  • 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 not None on all Structures
  • TextArtifacts contained in ListArtifact returned by WebSearch.search to properly formatted stringified JSON.
  • Structure run args not being set immediately.
  • Input and output logging in BaseAudioInputTasks and BaseAudioGenerationTasks
  • Validation of max_tokens < 0 on BaseChunker

v0.26.0

04 Jun 22:03
6056209
Compare
Choose a tag to compare

Added

  • 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 an AudioArtifact.
  • AudioTranscriptionTask and AudioTranscriptionClient for transcribing audio content in Structures.
  • OpenAiAudioTranscriptionDriver for integration with OpenAI's speech-to-text models, including Whisper.
  • Parameter env to BaseStructureRunDriver to set environment variables for a Structure Run.
  • PusherEventListenerDriver to enable sending of framework events over a Pusher WebSocket.

Changed

  • 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 to False on all Tools, making Task Memory something that must be explicitly opted into.
  • BREAKING: AmazonSageMakerPromptDriver.model parameter, which gets passed to SageMakerRuntime.Client.invoke_endpoint as EndpointName, is now renamed to AmazonSageMakerPromptDriver.endpoint.
  • BREAKING: AmazonSageMakerPromptDriver.model parameter is now optional being passed to SageMakerRuntime.Client.invoke_endpoint as InferenceComponentName (instead of EndpointName).
  • 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.

v0.25.1

15 May 19:25
a83fe51
Compare
Choose a tag to compare

Fixed

  • Honor namespace in RedisVectorStoreDriver.query().
  • Correctly set the meta, score, and vector fields of query result returned from RedisVectorStoreDriver.query().
  • Standardize behavior between omitted and empty actions list when initializing ActionsSubtask.

Added

  • Optional event batching on Event Listener Drivers.
  • id field to all events.

Changed

  • Default behavior of Event Listener Drivers to batch events.
  • Default behavior of OpenAiStructureConfig to utilize gpt-4o for prompt_driver.