griptape-ai / griptape

Modular Python framework for AI agents and workflows with chain-of-thought reasoning, tools, and memory.
https://www.griptape.ai
Apache License 2.0
1.95k stars 160 forks source link

Refactor/loaders #1116

Open collindutter opened 1 month ago

collindutter commented 1 month ago

Describe your changes

Added

Changed

The purpose of this PR was to clean up the Loader interface, and their define purpose.

Loaders fetch data from a source, and parse it into Artifacts. Loaders do not chunk data, that is the role of Chunkers.

We provide 4 top level Loaders that provide from a variety of sources:

BaseFileLoader then has subclasses that provide file-type specific parsing logic:


šŸ“š Documentation preview šŸ“š: https://griptape--1116.org.readthedocs.build//1116/

collindutter commented 3 weeks ago

Note that this PR's base branch is refactor/artifacts so no tests have run yet.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 95.58824% with 9 lines in your changes missing coverage. Please review. Files with missing lines Patch % Lines
griptape/loaders/text_loader.py 71.42% 1 Missing and 1 partial :warning:
griptape/utils/file_utils.py 80.00% 1 Missing and 1 partial :warning:
.../drivers/file_manager/local_file_manager_driver.py 75.00% 0 Missing and 1 partial :warning:
griptape/loaders/blob_loader.py 80.00% 1 Missing :warning:
griptape/tasks/base_image_generation_task.py 0.00% 1 Missing :warning:
griptape/tools/file_manager/tool.py 87.50% 0 Missing and 1 partial :warning:
griptape/tools/image_query/tool.py 0.00% 1 Missing :warning:

:loudspeaker: Thoughts on this report? Let us know!