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.27.0 #880

Merged
merged 115 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 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
9c22b0f
Version bump v0.27.0
collindutter Jun 19, 2024
c4bd124
Update changelog
collindutter Jun 19, 2024
571a46f
Docs improvements
collindutter Jun 19, 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
33 changes: 10 additions & 23 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
[run]
data_file = coverage/.coverage
branch = True

[report]
; Regexes for lines to exclude from consideration
exclude_also =
; Don't complain about missing debug-only code:
def __repr__
if self\.debug

; Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

; Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
if TYPE_CHECKING:

; Don't complain about abstract methods, they aren't run:
@(abc\.)?abstractmethod

[html]
directory = coverage/html

[xml]
output = coverage/coverage.xml
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
if TYPE_CHECKING:
class .*\bProtocol\):
@(abc\.)?abstractmethod
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ __pycache__
npm-debug.log
**/.mypy_cache/**
!yarn.lock
coverage/
cucumber-report.json
**/.vscode-test/**
**/.vscode test/**
Expand Down Expand Up @@ -57,3 +56,7 @@ dist/**
# mkdocs build output
site
reference

# coverage.py
htmlcov/
coverage.*
73 changes: 72 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,77 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [0.27.0] - 2024-06-19

### 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](https://platform.openai.com/docs/api-reference/completions).
- **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](https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html).
- `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`

## [0.26.0] - 2024-06-04

### Added
Expand All @@ -15,7 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `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.
- `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.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: ## Bump version and push to release branch.

.PHONY: publish
publish: ## Push git tag and publish version to PyPI.
@git tag v$$(poetry version -s)
@git tag $$(poetry version -s)
@git push --tags
@poetry build
@poetry publish
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/amazon-dynamodb-sessions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Griptape provides [Conversation Memory](../griptape-framework/structures/conversation-memory.md) as a means of persisting conversation context across multiple Structure runs.
If you provide it with a suitable Driver, the memory of the previous conversation can be preserved between run of a Structure, giving it additional context for how to respond.
While we can use the [LocalConversationMemoryDriver](../griptape-framework/drivers/conversation-memory-drivers.md#localconversationmemorydriver) to store the conversation history in a local file, this may not be suitable for production use cases.
While we can use the [LocalConversationMemoryDriver](../griptape-framework/drivers/conversation-memory-drivers.md#local) to store the conversation history in a local file, in production use-cases we may want to store in a proper database.

In this example, we will show you how to use the [AmazonDynamoDbConversationMemoryDriver](../griptape-framework/drivers/conversation-memory-drivers.md#amazondynamodbconversationmemorydriver) to persist the memory in an [Amazon DynamoDB](https://aws.amazon.com/dynamodb/) table. Please refer to the [Amazon DynamoDB documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/getting-started-step-1.html) for information on setting up DynamoDB.
In this example, we will show you how to use the [AmazonDynamoDbConversationMemoryDriver](../griptape-framework/drivers/conversation-memory-drivers.md#amazon-dynamodb) to persist the memory in an [Amazon DynamoDB](https://aws.amazon.com/dynamodb/) table. Please refer to the [Amazon DynamoDB documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/getting-started-step-1.html) for information on setting up DynamoDB.

This code implements the idea of a generic "Session" that represents a Conversation Memory entry. For example, a "Session" could be used to represent an individual user's conversation, or a group conversation thread.

Expand Down
46 changes: 22 additions & 24 deletions docs/examples/multi-agent-workflow.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
In this example we implement a multi-agent Workflow. We have a single "Researcher" Agent that conducts research on a topic, and then fans out to multiple "Writer" Agents to write blog posts based on the research.

By splitting up our workloads across multiple Structures, we can parallelize the work and leverage the strengths of each Agent. The Researcher can focus on gathering data and insights, while the Writers can focus on crafting engaging narratives.
Additionally, this architecture opens us up to using services such as [Griptape Cloud](https://www.griptape.ai/cloud) to have each Agent run on a separate machine, allowing us to scale our Workflow as needed 🤯.
Additionally, this architecture opens us up to using services such as [Griptape Cloud](https://www.griptape.ai/cloud) to have each Agent run completely independently, allowing us to scale our Workflow as needed 🤯. To try out how this would work, you can deploy this example as multiple structures from our [Sample Structures](https://github.com/griptape-ai/griptape-sample-structures/tree/main/griptape-multi-agent-workflows) repo.


```python
Expand Down Expand Up @@ -155,35 +155,33 @@ if __name__ == "__main__":
),
),
)
end_task = team.add_task(
PromptTask(
'State "All Done!"',
)
)
team.insert_tasks(
research_task,
[
StructureRunTask(
(
"""Using insights provided, develop an engaging blog
writer_tasks = team.add_tasks(*[
StructureRunTask(
(
"""Using insights provided, develop an engaging blog
post that highlights the most significant AI advancements.
Your post should be informative yet accessible, catering to a tech-savvy audience.
Make it sound cool, avoid complex words so it doesn't sound like AI.

Insights:
{{ parent_outputs["research"] }}""",
),
driver=LocalStructureRunDriver(
structure_factory_fn=lambda: build_writer(
role=writer["role"],
goal=writer["goal"],
backstory=writer["backstory"],
)
),
)
for writer in WRITERS
],
end_task,
),
driver=LocalStructureRunDriver(
structure_factory_fn=lambda: build_writer(
role=writer["role"],
goal=writer["goal"],
backstory=writer["backstory"],
)
),
parent_ids=[research_task.id],
)
for writer in WRITERS
])
end_task = team.add_task(
PromptTask(
'State "All Done!"',
parent_ids=[writer_task.id for writer_task in writer_tasks],
)
)

team.run()
Expand Down
4 changes: 2 additions & 2 deletions docs/griptape-framework/data/artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and access it with [embedding](../../reference/griptape/artifacts/text_artifact.
## CsvRowArtifact

Used for passing structured row data around the framework. It inherits from [TextArtifact](../../reference/griptape/artifacts/text_artifact.md) and overrides the
[to_text()](../../reference/griptape/artifacts/text_artifact.md#griptape.artifacts.text_artifact.TextArtifact.to_text) method, which always returns a valid CSV row.
[to_text()](../../reference/griptape/artifacts/csv_row_artifact.md#griptape.artifacts.csv_row_artifact.CsvRowArtifact.to_text) method, which always returns a valid CSV row.

## InfoArtifact

Expand All @@ -29,7 +29,7 @@ Used for passing errors back to the LLM without task memory storing them.
Used for passing binary large objects (blobs) back to the LLM.
Treat it as a way to return unstructured data, such as images, videos, audio, and other files back from tools.
Each blob has a [name](../../reference/griptape/artifacts/base_artifact.md#griptape.artifacts.base_artifact.BaseArtifact.name) and
[dir](../../reference/griptape/artifacts/blob_artifact.md#griptape.artifacts.blob_artifact.BlobArtifact.dir) to uniquely identify stored objects.
[dir](../../reference/griptape/artifacts/blob_artifact.md#griptape.artifacts.blob_artifact.BlobArtifact.dir_name) to uniquely identify stored objects.

[TaskMemory](../../reference/griptape/memory/task/task_memory.md) automatically stores [BlobArtifact](../../reference/griptape/artifacts/blob_artifact.md)s returned by tool activities that can be reused by other tools.

Expand Down
20 changes: 10 additions & 10 deletions docs/griptape-framework/data/loaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Loaders are used to load textual data from different sources and chunk it into [
Each loader can be used to load a single "document" with [load()](../../reference/griptape/loaders/base_loader.md#griptape.loaders.base_loader.BaseLoader.load) or
multiple documents with [load_collection()](../../reference/griptape/loaders/base_loader.md#griptape.loaders.base_loader.BaseLoader.load_collection).

## Pdf Loader
## PDF

!!! info
This driver requires the `loaders-pdf` [extra](../index.md#extras).
Expand Down Expand Up @@ -33,7 +33,7 @@ with open("attention.pdf", "rb") as attention, open("CoT.pdf", "rb") as cot:
PdfLoader().load_collection(list(load_files(["attention.pdf", "CoT.pdf"]).values()))
```

## Sql Loader
## SQL

Can be used to load data from a SQL database into [CsvRowArtifact](../../reference/griptape/artifacts/csv_row_artifact.md)s:

Expand All @@ -54,7 +54,7 @@ SqlLoader(
).load_collection(["SELECT 'foo', 'bar';", "SELECT 'fizz', 'buzz';"])
```

## Csv Loader
## CSV

Can be used to load CSV files into [CsvRowArtifact](../../reference/griptape/artifacts/csv_row_artifact.md)s:

Expand All @@ -76,7 +76,7 @@ CsvLoader().load_collection(list(load_files(["tests/resources/cities.csv", "test
```


## DataFrame Loader
## DataFrame

!!! info
This driver requires the `loaders-dataframe` [extra](../index.md#extras).
Expand All @@ -100,7 +100,7 @@ DataFrameLoader().load_collection(
```


## Text Loader
## Text

Used to load arbitrary text and text files:

Expand All @@ -124,9 +124,9 @@ with open("example.txt", "r") as f:
)
```

You can set a custom [tokenizer](../../reference/griptape/loaders/text_loader.md#griptape.loaders.text_loader.TextLoader.tokenizer.md), [max_tokens](../../reference/griptape/loaders/text_loader.md#griptape.loaders.text_loader.TextLoader.max_tokens.md) parameter, and [chunker](../../reference/griptape/loaders/text_loader.md#griptape.loaders.text_loader.TextLoader.chunker.md).
You can set a custom [tokenizer](../../reference/griptape/loaders/text_loader.md#griptape.loaders.text_loader.TextLoader.tokenizer), [max_tokens](../../reference/griptape/loaders/text_loader.md#griptape.loaders.text_loader.TextLoader.max_tokens) parameter, and [chunker](../../reference/griptape/loaders/text_loader.md#griptape.loaders.text_loader.TextLoader.chunker).

## Web Loader
## Web

!!! info
This driver requires the `loaders-web` [extra](../index.md#extras).
Expand All @@ -145,7 +145,7 @@ WebLoader().load_collection(
)
```

## Image Loader
## Image

!!! info
This driver requires the `loaders-image` [extra](../index.md#extras).
Expand Down Expand Up @@ -183,7 +183,7 @@ ImageLoader().load_collection(list(load_files(["tests/resources/mountain.png", "
```


## Email Loader
## Email

!!! info
This driver requires the `loaders-email` [extra](../index.md#extras).
Expand All @@ -200,7 +200,7 @@ loader.load(EmailLoader.EmailQuery(label="INBOX"))
loader.load_collection([EmailLoader.EmailQuery(label="INBOX"), EmailLoader.EmailQuery(label="SENT")])
```

## Audio Loader
## Audio

!!! info
This driver requires the `loaders-audio` [extra](../index.md#extras).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You can persist and load memory by using Conversation Memory Drivers. You can build drivers for your own data stores by extending [BaseConversationMemoryDriver](../../reference/griptape/drivers/memory/conversation/base_conversation_memory_driver.md).

### LocalConversationMemoryDriver
### Local

The [LocalConversationMemoryDriver](../../reference/griptape/drivers/memory/conversation/local_conversation_memory_driver.md) allows you to persist Conversation Memory in a local JSON file.

Expand All @@ -18,7 +18,7 @@ agent.run("Surfing is my favorite sport.")
agent.run("What is my favorite sport?")
```

### AmazonDynamoDbConversationMemoryDriver
### Amazon DynamoDb

!!! info
This driver requires the `drivers-memory-conversation-amazon-dynamodb` [extra](../index.md#extras).
Expand Down Expand Up @@ -47,7 +47,7 @@ agent.run("What is my name?")
```


### Redis Conversation Memory Driver
### Redis

!!! info
This driver requires the `drivers-memory-conversation-redis` [extra](../index.md#extras).
Expand Down
Loading
Loading