Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.28.0 #947

Merged
merged 152 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
8e04019
Feature/query engine improvements (#713)
collindutter Mar 29, 2024
d05fb3c
Cjkindel/api keys (#721)
cjkindel Apr 1, 2024
44dd2b8
Merge patch v0.24.1 back to dev (#720)
andrewfrench Apr 1, 2024
7582cf8
Improve Tool Task system prompt (#723)
collindutter Apr 1, 2024
76e7177
Output single artifact, move value to name (#724)
collindutter Apr 2, 2024
af48466
Add minItems to ToolkitTask actions schema (#725)
collindutter Apr 2, 2024
b1aaab5
Add FileManager.list_files_from_disk (#726)
vasinov Apr 2, 2024
f8a7b69
Update default API version for `AzureOpenAiImageGenerationDriver` (#731)
vachillo Apr 3, 2024
ef764c9
Improve readme (#727)
collindutter Apr 5, 2024
44b0653
Backmerge `main` to `dev` for v0.24.2 (#733)
andrewfrench Apr 8, 2024
c9edaff
Remove file reading responsibility from loaders (#737)
dylanholmes Apr 9, 2024
c403954
Feature/event listener drivers (#735)
collindutter Apr 10, 2024
f4b2af7
Fix trailing slash (#740)
collindutter Apr 10, 2024
3cac561
Add LocalFileManagerDriver (#738)
dylanholmes Apr 11, 2024
fa2f337
Add new fields to events (#742)
collindutter Apr 11, 2024
fe53d86
Remove boto3 from types (#741)
collindutter Apr 11, 2024
2cc293c
Add AmazonS3FileManagerDriver (#743)
dylanholmes Apr 12, 2024
54ef8fb
Add MediaArtifact (#520)
andrewfrench Apr 12, 2024
ed08311
Add docs to repo (#744)
collindutter Apr 16, 2024
fe9abf9
Add missing readthedocs poetry setup (#748)
collindutter Apr 16, 2024
b944728
Remove references to old docs repo (#749)
collindutter Apr 16, 2024
77ba1a7
Fix type hint for token_provider, Add missing params in `AzureOpenAiC…
vachillo Apr 17, 2024
e16f729
Add optional exception attribute to ErrorArtifact (#747)
michal-repo Apr 17, 2024
16305a0
Edit events route in GriptapeCloudEventListenerDriver (#753)
dylanholmes Apr 19, 2024
f16f421
Feature/conversation memory (#751)
collindutter Apr 23, 2024
670616f
Pull cloud url from env var (#756)
collindutter Apr 23, 2024
30d3e29
Rename GT Cloud run ID env var (#758)
zachgiordano Apr 25, 2024
f2ac9ca
Fix vector query engine exceeding token limits (#759)
collindutter Apr 26, 2024
9aa2f02
Add cloud docs API Reference (#760)
zachgiordano Apr 29, 2024
5c93b4e
Add file utils (#745)
collindutter Apr 29, 2024
c009e53
Update api-reference.md (#761)
eltociear Apr 29, 2024
88520d8
Add note to changelog regarding stability v0 deprecation (#762)
collindutter Apr 29, 2024
df8b42b
Update to pinecone@3 (#763)
collindutter Apr 30, 2024
a33324b
Add structure run tool (#764)
zachgiordano Apr 30, 2024
40735bb
Export GriptapeCloudStructureRunClient in tools __all__ (#766)
zachgiordano May 1, 2024
b2f1323
Update structure run tool example docs (#769)
zachgiordano May 2, 2024
333b4d5
Feature/better events (#768)
collindutter May 3, 2024
8584f0d
Fix docs for extras (#770)
collindutter May 3, 2024
0c87ea2
Add structure run tool/task (#767)
collindutter May 6, 2024
57a4a29
Merge branch 'main' into dev
collindutter May 6, 2024
73cc9a8
Use factory in example (#772)
collindutter May 6, 2024
a899f5a
Merge branch 'main' into dev
collindutter May 6, 2024
307ac2b
Support batched events (#777)
collindutter May 14, 2024
c39ad53
Add gpt-4o and update OpenAiStructureConfig default prompt_driver (#780)
zachgiordano May 14, 2024
6e1e84f
Update tiktoken to support GPT-4o (#783)
andrewfrench May 15, 2024
72e3022
Support case when model returns empty Actions list (#779)
andrewfrench May 15, 2024
3d4c581
Fix RedisVectorStoreDriver bugs (#782)
dylanholmes May 15, 2024
44a2c62
Text to Speech Support (#755)
andrewfrench May 15, 2024
f1a2dba
Add `RedisConversationMemoryDriver` (#787)
vachillo May 16, 2024
c9afae6
Merge main to dev (#789)
andrewfrench May 17, 2024
fcb9727
Add ruff to github code check, use local deps for pre-commit (#784)
collindutter May 17, 2024
e2f7f72
Refactor how configs work (#765)
collindutter May 20, 2024
7ed3b90
Add codecov (#794)
collindutter May 20, 2024
540e8f3
Add `AzureOpenAiStructureConfig`, default `azure_deployment` (#788)
vachillo May 20, 2024
9db5c8d
Run integration tests on push to `main` and `dev` (#795)
vachillo May 21, 2024
b0606c7
Fix hugging face prompt pipeline driver + docs (#796)
dylanholmes May 22, 2024
f7bf180
Makefile target for big install command (#797)
andrewfrench May 22, 2024
157186a
Update Makefile + process-as-code (#799)
andrewfrench May 23, 2024
7470684
Set concurrency for actions (#801)
collindutter May 23, 2024
04af7d1
Update OpenAI image query default model to GPT-4o (#802)
andrewfrench May 23, 2024
2e030bb
Fix/docs extras (#803)
collindutter May 23, 2024
3f3f8b9
Update `init=False` instances (#804)
vachillo May 24, 2024
943ce72
Use environment variables for structure runs (#808)
vachillo May 31, 2024
427df75
chore: update `attr` to `attrs` (#810)
vachillo May 31, 2024
5a0e1c3
Refactor tasks to use ListArtifact as input (#811)
collindutter May 31, 2024
9f78733
Fix type (#813)
collindutter May 31, 2024
9f19f60
Default `off_prompt=False` on `BaseTool` (#757)
collindutter Jun 3, 2024
81ec3b6
Update openai example to use gpt-4o (#817)
collindutter Jun 3, 2024
385cb62
Fix doc examples (#819)
collindutter Jun 3, 2024
ff008c0
Audio transcription support (#781)
andrewfrench Jun 4, 2024
1b1accc
Feature/pusher event driver (#821)
kyleroche Jun 4, 2024
c6cceda
Fix computer tool (#820)
collindutter Jun 4, 2024
7fe0f7d
Don't exlude extra fields (#825)
collindutter Jun 4, 2024
dc9e585
Add support for Llama 3 on Amazon SageMaker (#800)
dylanholmes Jun 4, 2024
1865b64
Fix integ tests (#827)
collindutter Jun 4, 2024
0fade64
Fix out of space issue during integration tests (#828)
collindutter Jun 4, 2024
23018b8
adding docs for griptape-cloud-knowledge-base-client (#824)
emjay07 Jun 4, 2024
3bd2adf
Merge branch 'main' into dev
collindutter Jun 4, 2024
21c17b5
Ignore computer tool due to out of space issues (#830)
collindutter Jun 4, 2024
1042211
Merge branch 'main' into dev
collindutter Jun 4, 2024
a7f83b3
Updated `HuggingFaceHubPromptDriver` to use `transformers`'s `apply_c…
collindutter Jun 5, 2024
7025db8
Updated `HuggingFacePipelinePromptDriver` to use chat features of `tr…
collindutter Jun 5, 2024
8630317
Add task relationship APIs (#822)
dylanholmes Jun 5, 2024
7a137e1
Update cohere prompt driver, add cohere embedding driver, cohere stru…
collindutter Jun 5, 2024
e167885
Update BedrockPromptDriver to use Converse API (#834)
collindutter Jun 5, 2024
8d6de30
Remove un-used header extraction (#838)
collindutter Jun 6, 2024
4e1f3b0
Remove Legacy `OpenAiChatCompletionPromptDriver` (#835)
collindutter Jun 6, 2024
30aa370
Improve error when knowledgebase is missing a description (#839)
collindutter Jun 6, 2024
5e2e1a1
Remove old tokenizer docs (#841)
collindutter Jun 7, 2024
839ffb8
Correctly Ignore TYPE_CHECKING in coverage (#845)
collindutter Jun 7, 2024
029a65d
Reduce scope of Amazon SageMaker Prompt Driver to only Jumpstart (#837)
collindutter Jun 7, 2024
fc9c976
Update `GriptapeCloudKnowledgeBaseClient` description fetching (#846)
vachillo Jun 10, 2024
9c0d368
Fix streaming not working when using deprecated Structure.stream fiel…
collindutter Jun 10, 2024
b466356
Add StructureVisualizer util (#844)
collindutter Jun 11, 2024
75c502f
Add new Workflow/Task helper methods (#842)
collindutter Jun 11, 2024
331c331
Refactor/tokenizers (#840)
collindutter Jun 11, 2024
331c643
adding a link out to sample repo for multi-agents hosted in gtc (#850)
emjay07 Jun 11, 2024
ff6ddfd
Fix `ActionSubtask` output value (#853)
vachillo Jun 11, 2024
b634598
Fix/standardize all links, enable docs strict mode (#852)
collindutter Jun 12, 2024
71c8d4d
Fix header indents (#855)
collindutter Jun 12, 2024
bfd7896
Re-order Workflow tasks on every task execution wave (#857)
cjkindel Jun 12, 2024
7c36226
Handle errors in web loader and return ErrorArtifact (#858)
zachgiordano Jun 13, 2024
e54a04b
Add structure property `output`; add `output_task.output` check (#862)
vachillo Jun 13, 2024
9b934ee
Fix `WebSearch.search` output (#854)
vachillo Jun 13, 2024
5fe8c63
Reset Tasks and set Structure args before run (#865)
collindutter Jun 14, 2024
76f5594
Split `PromptSummaryEngine` prompt stack template (#866)
vachillo Jun 14, 2024
f2342e6
Small improvements to Audio tasks/tools (#843)
andrewfrench Jun 17, 2024
53ca5b1
Validate `max_tokens`, fix tests (#868)
vachillo Jun 18, 2024
6ceadf6
Add 'self.order_tasks()' before getting 'output_task' (#873)
vachillo Jun 18, 2024
3a203ed
Feature/ollama (#847)
collindutter Jun 18, 2024
0f196f5
Add insert_tasks example (#877)
dylanholmes Jun 18, 2024
68d9dae
Don't include "v" in tag name (#879)
collindutter Jun 19, 2024
6ce2615
Merge branch 'main' into dev
collindutter Jun 19, 2024
28a8a14
Update `WebSearch` to use a driver; add drivers for Google and DuckDu…
vachillo Jun 19, 2024
73c1d51
Fix/drivers headers (#881)
collindutter Jun 19, 2024
ab82f3c
Add `ProxyWebScraperDriver` (#886)
vachillo Jun 21, 2024
cff3f79
Update `AmazonBedrockStructureConfig` with helper params (#882)
vachillo Jun 21, 2024
d5d7544
Merge branch 'main' into dev
collindutter Jun 21, 2024
535380c
Replace `VectorQueryEngine` with `RagEngine` (#860)
vasinov Jun 21, 2024
095d12f
Change GriptapeCloudKnowledgeBaseClient to use /search API (#888)
cjkindel Jun 24, 2024
9010fdc
`meta` parameter added to TextArtifact (#891)
cjkindel Jun 24, 2024
c2575f5
Handle error on vector entry not existing (#893)
cjkindel Jun 25, 2024
2df58d5
Bumping gemini to latest version (#892)
emjay07 Jun 25, 2024
80c27cb
VectorStoreClient improvements (#899)
vasinov Jun 25, 2024
22981b1
Wrap future execution with context managers (#898)
vasinov Jun 25, 2024
2a347f3
Bug Fix: Cohere prompts with no history (#900)
emjay07 Jun 25, 2024
6d08c20
Fix `StructureVisualizer.to_url()` (#903)
vachillo Jun 27, 2024
ef07002
Add `fail_fast` parameter to `Structure` (#908)
vachillo Jun 27, 2024
3858cdc
fixing bug for upserting csv artifacts (#909)
emjay07 Jun 27, 2024
b93f209
All `futures_executor` fields renamed to `futures_executor_fn` and no…
vasinov Jun 27, 2024
3ee8c35
Add `BooleanArtifact` (#905)
vachillo Jun 28, 2024
becdc1d
Add pull request template (#921)
collindutter Jul 1, 2024
1cd5588
Fix missing parent error handling in Workflow task insertion (#856)
cjkindel Jul 1, 2024
f8be8ee
Ensure Executor.shutdown() called after task submission in BaseEventL…
dylanholmes Jul 1, 2024
db9051d
`typos` to dev dependencies to catch typos in code/docs. (#923)
collindutter Jul 2, 2024
2dcfe2d
Refactor prompt stack (#861)
collindutter Jul 2, 2024
cfb6e9f
Merge branch 'main' into dev
collindutter Jul 2, 2024
07e2a1c
Add support for Qdrant VectorDB (#928)
vachillo Jul 2, 2024
ef46d1e
Update contributing guidelines (#927)
collindutter Jul 2, 2024
7487441
Fix integration tests; Update `PromptTask` input validation (#931)
vachillo Jul 2, 2024
de2315c
Bump pydantic,urllib3,requests (#933)
vachillo Jul 3, 2024
89b69bc
Use custom discord invite link (#932)
cjkindel Jul 3, 2024
1f09acb
`RagContext` and other `RagEngine` improvements (#930)
vasinov Jul 3, 2024
83a16ac
Update `StructureVisualizer` (#936)
vachillo Jul 3, 2024
d6cf531
Update pyright, fix new pyright errors (#934)
collindutter Jul 3, 2024
c16f3f4
Fix changelog (#938)
collindutter Jul 3, 2024
c785aba
DynamoDB sort key (#917)
datashaman Jul 5, 2024
3e5bd03
Update ruff linter rules according to documentation (#940)
collindutter Jul 5, 2024
731c3bb
`FootnotePromptResponseRagModule`, `TextLoaderRetrievalRagModule`, an…
vasinov Jul 8, 2024
bb158ea
Update certifi (#944)
zachgiordano Jul 8, 2024
c9b92ea
Fix azure streaming (#946)
collindutter Jul 9, 2024
669811f
Update changelog
collindutter Jul 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [ ] I have read and agree to the contributing guidelines for [submitting new pull requests](https://github.com/griptape-ai/griptape?tab=readme-ov-file#submitting-pull-requests).

## Describe your changes

## Issue ticket number and link
13 changes: 13 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,16 @@ jobs:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
spell-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.12" ]
steps:
- name: Checkout actions
uses: actions/checkout@v3
- name: Init environment
uses: ./.github/actions/init-environment
- name: Run linter
run: make check/spell
3 changes: 3 additions & 0 deletions .github/workflows/docs-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ jobs:
PUSHER_KEY: ${{ secrets.INTEG_PUSHER_KEY }}
PUSHER_SECRET: ${{ secrets.INTEG_PUSHER_SECRET }}
PUSHER_CLUSTER: ${{ secrets.INTEG_PUSHER_CLUSTER }}
ZENROWS_API_KEY: ${{ secrets.INTEG_ZENROWS_API_KEY }}
QDRANT_CLUSTER_ENDPOINT: ${{ secrets.INTEG_QDRANT_CLUSTER_ENDPOINT }}
QDRANT_CLUSTER_API_KEY: ${{ secrets.INTEG_QDRANT_CLUSTER_API_KEY }}
services:
postgres:
image: ankane/pgvector:v0.5.0
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ repos:
entry: make check/types
language: system
types: [python]
- repo: local
hooks:
- id: typos
name: Typos
entry: make check/spell
language: system
types: [python]
86 changes: 85 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,85 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [0.28.0] - 2024-07-09
### 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 `TextArtifact`s, `ImageArtifact`s, and `ListArtifact`s 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 `PromptTask`s to take `TextArtifact`s, `ImageArtifact`s, and `ListArtifact`s 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.

## [0.27.2] - 2024-06-27

### Fixed
Expand Down Expand Up @@ -86,6 +165,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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.
- `Workflow.insert_task()` enumerates by parent id equality, opposed to object equality.
- 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.
Expand All @@ -105,6 +185,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `PusherEventListenerDriver` to enable sending of framework events over a Pusher WebSocket.

### Changed
- **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**: 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.
Expand All @@ -120,6 +202,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Extra fields being excluded when using `SerializableMixin.from_dict`.
- Validation of `max_tokens` < 0 on `BaseChunker`

## [0.25.1] - 2024-05-15

Expand Down Expand Up @@ -211,6 +294,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `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.
- `QdrantVectorStoreDriver` to integrate with Qdrant vector databases.

### Fixed
- Improved system prompt in `ToolTask` to support more use cases.
Expand Down Expand Up @@ -316,7 +400,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `ImageLoader` for loading images files into `ImageArtifact`s.

- Support for all Tokenizers in `OpenAiChatPromptDriver`, enabling OpenAI drop-in clients such as Together AI.
- `AmazonSageMakerEmbeddingDriver` for using Amazon SageMaker to generate embeddings. Thanks @KaushikIyer16!
- `AmazonSageMakerJumpstartEmbeddingDriver` for using Amazon SageMaker to generate embeddings. Thanks @KaushikIyer16!
- Claude 2.1 support in `AnthropicPromptDriver` and `AmazonBedrockPromptDriver` via `BedrockClaudePromptModelDriver`.
- `CodeExecutionTask` for executing code as a Task without the need for an LLM.
- `BedrockLlamaPromptModelDriver` for using Llama models on Amazon Bedrock.
Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ publish: ## Push git tag and publish version to PyPI.
install: ## Install all dependencies.
@poetry install --with dev --with test --with docs --all-extras

.PHONY: test
test: test/unit test/integration ## Run all tests.
.PHONY: test ## Run all tests.
test: test/unit test/integration

.PHONY: test/unit
test/unit: ## Run unit tests.
Expand All @@ -40,7 +40,7 @@ format: ## Format project.
@poetry run ruff format .

.PHONY: check
check: check/format check/lint check/types ## Run all checks.
check: check/format check/lint check/types check/spell ## Run all checks.

.PHONY: check/format
check/format:
Expand All @@ -53,6 +53,14 @@ check/lint:
.PHONY: check/types
check/types:
@poetry run pyright griptape/

.PHONY: check/spell
check/spell:
@poetry run typos

.PHONY: docs
docs: ## Build documentation.
@poetry run mkdocs build

.DEFAULT_GOAL := help
.PHONY: help
Expand Down
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![codecov](https://codecov.io/github/griptape-ai/griptape/graph/badge.svg?token=HUBqUpl3NB)](https://codecov.io/github/griptape-ai/griptape)
[![Griptape Discord](https://dcbadge.vercel.app/api/server/gnWRz88eym?compact=true&style=flat)](https://discord.gg/gnWRz88eym)
[![Griptape Discord](https://dcbadge.vercel.app/api/server/gnWRz88eym?compact=true&style=flat)](https://discord.gg/griptape)

Griptape is a modular Python framework for building AI-powered applications that securely connect to your enterprise data and APIs. It offers developers the ability to maintain control and flexibility at every step.

Expand Down Expand Up @@ -50,7 +50,7 @@ Drivers facilitate interactions with external resources and services:

Engines wrap Drivers and provide use-case-specific functionality:

- 📊 **Query Engines** execute Retrieval Augmented Generation (RAG) queries.
- 📊 **RAG Engine** is an abstraction for implementing modular Retrieval Augmented Generation (RAG) pipelines.
- 🛠️ **Extraction Engines** extract JSON or CSV data from unstructured text.
- 📝 **Summary Engines** generate summaries from textual content.
- 🖼️ **Image Generation Engines** generate images from textual descriptions.
Expand Down Expand Up @@ -92,7 +92,7 @@ from griptape.structures import Agent
from griptape.tools import WebScraper, FileManager, TaskMemoryClient

agent = Agent(
input_template="Load {{ args[0] }}, summarize it, and store it in a file called {{ args[1] }}.",
input="Load {{ args[0] }}, summarize it, and store it in a file called {{ args[1] }}.",
tools=[
WebScraper(off_prompt=True),
TaskMemoryClient(off_prompt=True),
Expand Down Expand Up @@ -162,12 +162,6 @@ Thank you for considering contributing to Griptape! Before you start, please rea

If you have identified a bug, want to propose a new feature, or have a question, please submit an issue through our public [issue tracker](https://github.com/griptape-ai/griptape/issues). Before submitting a new issue, please check the existing issues to ensure it hasn't been reported or discussed before.

### New Griptape Tools

Griptape's extensibility allows anyone to develop and distribute tools independently. With rare exceptions for Tools providing broadly applicable functionality, new Griptape Tools should be managed as their own projects and not submitted to the core framework. Pull requests for new tools (unless addressing an [existing issue](https://github.com/griptape-ai/griptape/issues)) will be closed.

The [Griptape Tool Template](https://github.com/griptape-ai/tool-template) provides the recommended structure, step-by-step instructions, basic automation, and usage examples for new Tools. In the Template, select **Use this template** then **Create a new repository** to begin a new Tool project.

### Submitting Pull Requests

We welcome and encourage pull requests. To streamline the process, please follow these guidelines:
Expand All @@ -178,13 +172,27 @@ We welcome and encourage pull requests. To streamline the process, please follow

3. **Unit Tests:** Ensure that your pull request passes all existing unit tests. Additionally, if you are introducing new code, please include new unit tests to validate its functionality.

Run `make test/unit` to execute the test suite locally.

4. **Documentation:** Every pull request must include updates to documentation or explicitly explain why a documentation update is not required. Documentation is crucial for maintaining a comprehensive and user-friendly project.

5. **Code Style:** Griptape uses [Ruff](https://github.com/astral-sh/ruff) to enforce style guidelines. You can ensure that your code is formatted accordingly and will pass formatting checks using `pre-commit`. See [Tools](#tools) for information on how to configure this and other dev tools.
Run `make docs` to build the documentation locally.

5. **Code Checks:** Griptape a variety of tools to enforce code quality and style. Your code must pass all checks before it can be merged.

Run `make check` to run all code checks locally.

6. **Changelog:** If your pull request introduces a notable change, please update the [changelog](https://github.com/griptape-ai/griptape/blob/dev/CHANGELOG.md).

### New Griptape Tools

Griptape's extensibility allows anyone to develop and distribute tools independently. With rare exceptions for Tools providing broadly applicable functionality, new Griptape Tools should be managed as their own projects and not submitted to the core framework. Pull requests for new tools (unless addressing an [existing issue](https://github.com/griptape-ai/griptape/issues)) will be closed.

The [Griptape Tool Template](https://github.com/griptape-ai/tool-template) provides the recommended structure, step-by-step instructions, basic automation, and usage examples for new Tools. In the Template, select **Use this template** then **Create a new repository** to begin a new Tool project.

### Tools
### Dev and Test Dependencies

Install dev dependencies via Make:
Install all dependencies via Make:

```shell
make install
Expand Down
8 changes: 8 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[default.extend-words]
# Don't correct the state ND
ND = "ND"
# Don't correct pirates using acronyms
mornin = "mornin"

[files]
extend-exclude = ["docs/assets", "tests/resources/"]
7 changes: 2 additions & 5 deletions docs/examples/load-query-and-chat-marqo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
import os
from griptape import utils
from griptape.drivers import MarqoVectorStoreDriver
from griptape.engines import VectorQueryEngine
from griptape.loaders import WebLoader
from griptape.structures import Agent
from griptape.tools import VectorStoreClient
from griptape.drivers import LocalVectorStoreDriver, OpenAiEmbeddingDriver, OpenAiChatPromptDriver
from griptape.drivers import OpenAiEmbeddingDriver

# Define the namespace
namespace = "griptape-ai"
Expand All @@ -18,14 +17,12 @@ vector_store = MarqoVectorStoreDriver(
index=os.environ["MARQO_INDEX_NAME"],
embedding_driver=OpenAiEmbeddingDriver()
)
# Initialize the query engine
query_engine = VectorQueryEngine(vector_store_driver=vector_store, prompt_driver=OpenAiChatPromptDriver(model="gpt-3.5-turbo"))

# Initialize the knowledge base tool
vector_store_tool = VectorStoreClient(
description="Contains information about the Griptape Framework from www.griptape.ai",
query_engine=query_engine,
namespace=namespace,
vector_store_driver=vector_store
)

# Load artifacts from the web
Expand Down
8 changes: 5 additions & 3 deletions docs/examples/multi-agent-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Additionally, this architecture opens us up to using services such as [Griptape
```python
import os

from griptape.drivers import WebhookEventListenerDriver, LocalStructureRunDriver
from griptape.drivers import WebhookEventListenerDriver, LocalStructureRunDriver, GoogleWebSearchDriver
from griptape.events import EventListener, FinishStructureRunEvent
from griptape.rules import Rule, Ruleset
from griptape.structures import Agent, Workflow
Expand Down Expand Up @@ -38,8 +38,10 @@ def build_researcher():
id="researcher",
tools=[
WebSearch(
google_api_key=os.environ["GOOGLE_API_KEY"],
google_api_search_id=os.environ["GOOGLE_API_SEARCH_ID"],
web_search_driver=GoogleWebSearchDriver(
api_key=os.environ["GOOGLE_API_KEY"],
search_id=os.environ["GOOGLE_API_SEARCH_ID"],
),
),
WebScraper(
off_prompt=True,
Expand Down
6 changes: 1 addition & 5 deletions docs/examples/multiple-agent-shared-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ The `MongoDbAtlasVectorStoreDriver` assumes that you have a vector index configu

```python
import os
from griptape.tools import WebScraper, VectorStoreClient, TaskMemoryClient
from griptape.tools import WebScraper, TaskMemoryClient
from griptape.structures import Agent
from griptape.drivers import AzureOpenAiEmbeddingDriver, AzureMongoDbVectorStoreDriver
from griptape.engines import VectorQueryEngine, PromptSummaryEngine, CsvExtractionEngine, JsonExtractionEngine
from griptape.memory import TaskMemory
from griptape.artifacts import TextArtifact
from griptape.memory.task.storage import TextArtifactStorage
from griptape.config import AzureOpenAiStructureConfig


Expand Down
2 changes: 1 addition & 1 deletion docs/examples/query-webpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ results = vector_store.query(
namespace="griptape"
)

values = [BaseArtifact.from_json(r.meta["artifact"]).value for r in results]
values = [r.to_artifact().value for r in results]

print("\n\n".join(values))
```
Loading
Loading