diff --git a/CHANGELOG.md b/CHANGELOG.md index a4b0b0e04..6f8bf41fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Global config, `griptape.config.config`, for setting global configuration defaults. - Unique name generation for all `RagEngine` modules. - `ExtractionTool` Tool for having the LLM extract structured data from text. -- `PromptSummaryClient` Tool for having the LLM summarize text. +- `PromptSummaryTool` Tool for having the LLM summarize text. - `QueryTool` Tool for having the LLM query text. ### Changed @@ -31,6 +31,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **BREAKING**: `RagContext.output` was changed to `RagContext.outputs` to support multiple outputs. All relevant RAG modules were adjusted accordingly. - **BREAKING**: Removed before and after response modules from `ResponseRagStage`. - **BREAKING**: Moved ruleset and metadata ingestion from standalone modules to `PromptResponseRagModule`. +- **BREAKING**: Dropped `Client` from all Tool names for better naming consistency. +- **BREAKING**: Dropped `_client` suffix from all Tool packages. +- **BREAKING**: Added `Tool` suffix to all Tool names for better naming consistency. - **BREAKING**: Removed `TextArtifactStorage.query` and `TextArtifactStorage.summarize`. - **BREAKING**: Removed `TextArtifactStorage.rag_engine`, and `TextArtifactStorage.retrieval_rag_module_name`. - **BREAKING**: Removed `TextArtifactStorage.summary_engine`, `TextArtifactStorage.csv_extraction_engine`, and `TextArtifactStorage.json_extraction_engine`. @@ -41,11 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **BREAKING**: Changed `JsonExtractionEngine.template_schema` from a `run` argument to a class attribute. - **BREAKING**: Changed `CsvExtractionEngine.column_names` from a `run` argument to a class attribute. - **BREAKING**: Removed `JsonExtractionTask`, and `CsvExtractionTask` use `ExtractionTask` instead. -- **BREAKING**: Removed `TaskMemoryClient`, use `RagClient`, `ExtractionTool`, or `PromptSummaryClient` instead. -- **BREAKING**: Dropped `Client` from all Tool names for better naming consistency. -- **BREAKING**: Dropped `_client` suffix from all Tool packages. -- **BREAKING**: Added `Tool` suffix to all Tool names for better naming consistency. -- `RagClient` now can be used to search through Artifacts stored in Task Memory. +- **BREAKING**: Removed `TaskMemoryClient`, use `RagClient`, `ExtractionTool`, or `PromptSummaryTool` instead. - Engines that previously required Drivers now pull from `griptape.config.config.drivers` by default. - `BaseTask.add_parent/child` will now call `self.structure.add_task` if possible. diff --git a/README.md b/README.md index bc82e645d..d9f21c2d8 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ And here is the output: Actions: [ { "tag": "call_o9F1taIxHty0mDlWLcAjTAAu", - "name": "PromptSummaryClient", + "name": "PromptSummaryTool", "path": "summarize", "input": { "values": { @@ -139,7 +139,7 @@ And here is the output: } ] [08/12/24 14:48:21] INFO Subtask dca04901436d49d2ade86cd6b4e1038a - Response: Output of "PromptSummaryClient.summarize" was stored in memory with memory_name "TaskMemory" and artifact_namespace + Response: Output of "PromptSummaryTool.summarize" was stored in memory with memory_name "TaskMemory" and artifact_namespace "73765e32b8404e32927822250dc2ae8b" [08/12/24 14:48:22] INFO Subtask c233853450fb4fd6a3e9c04c52b33bf6 Actions: [ diff --git a/_typos.toml b/_typos.toml index 29f892536..659cc6823 100644 --- a/_typos.toml +++ b/_typos.toml @@ -9,4 +9,3 @@ mornin = "mornin" [files] extend-exclude = ["docs/assets", "tests/resources/"] - diff --git a/docs/griptape-framework/index.md b/docs/griptape-framework/index.md index 4b0d7dac2..3dd294f0b 100644 --- a/docs/griptape-framework/index.md +++ b/docs/griptape-framework/index.md @@ -150,7 +150,7 @@ Agents are great for getting started, but they are intentionally limited to a si Actions: [ { "tag": "call_ElTYTPeocOU62I0VjzRqmfoF", - "name": "PromptSummaryClient", + "name": "PromptSummaryTool", "path": "summarize", "input": { "values": { diff --git a/docs/griptape-framework/structures/task-memory.md b/docs/griptape-framework/structures/task-memory.md index 59fc2000a..0d479a36b 100644 --- a/docs/griptape-framework/structures/task-memory.md +++ b/docs/griptape-framework/structures/task-memory.md @@ -69,15 +69,15 @@ Let's explore what happens when `off_prompt` is set to `True`: ``` When we set `off_prompt` to `True`, the Agent does not function as expected, even generating an error. This is because the Calculator output is being stored in Task Memory but the Agent has no way to access it. -To fix this, we need a [Tool that can read from Task Memory](#tools-that-can-read-from-task-memory) such as the `PromptSummaryClient`. +To fix this, we need a [Tool that can read from Task Memory](#tools-that-can-read-from-task-memory) such as the `PromptSummaryTool`. This is an example of [not providing a Task Memory compatible Tool](#not-providing-a-task-memory-compatible-tool). ## Prompt Summary Client -The [PromptSummaryClient](../../griptape-tools/official-tools/prompt-summary-client.md) is a Tool that allows an Agent to summarize the Artifacts in Task Memory. It has the following methods: +The [PromptSummaryTool](../../griptape-tools/official-tools/prompt-summary-client.md) is a Tool that allows an Agent to summarize the Artifacts in Task Memory. It has the following methods: -Let's add `PromptSummaryClient` to the Agent and run the same task. -Note that on the `PromptSummaryClient` we've set `off_prompt` to `False` so that the results of the query can be returned directly to the LLM. +Let's add `PromptSummaryTool` to the Agent and run the same task. +Note that on the `PromptSummaryTool` we've set `off_prompt` to `False` so that the results of the query can be returned directly to the LLM. If we had kept it as `True`, the results would have been stored back Task Memory which would've put us back to square one. See [Task Memory Looping](#task-memory-looping) for more information on this scenario. ```python @@ -107,7 +107,7 @@ If we had kept it as `True`, the results would have been stored back Task Memory Actions: [ { "tag": "call_qqpsWEvAUGIcPLrwAHGuH6o3", - "name": "PromptSummaryClient", + "name": "PromptSummaryTool", "path": "summarize", "input": { "values": { @@ -273,7 +273,7 @@ As seen in the previous example, certain Tools are designed to read directly fro Today, these include: -- [PromptSummaryClient](../../griptape-tools/official-tools/prompt-summary-client.md) +- [PromptSummaryTool](../../griptape-tools/official-tools/prompt-summary-client.md) - [ExtractionTool](../../griptape-tools/official-tools/extraction-client.md) - [RagClient](../../griptape-tools/official-tools/rag-client.md) - [FileManagerTool](../../griptape-tools/official-tools/file-manager.md) diff --git a/docs/griptape-framework/structures/tasks.md b/docs/griptape-framework/structures/tasks.md index 2c3c96751..0cf601220 100644 --- a/docs/griptape-framework/structures/tasks.md +++ b/docs/griptape-framework/structures/tasks.md @@ -121,7 +121,7 @@ This Task takes in one or more Tools which the LLM will decide to use through Ch Actions: [ { "tag": "call_aT7DX0YSQPmOcnumWXrGoMNt", - "name": "PromptSummaryClient", + "name": "PromptSummaryTool", "path": "summarize", "input": { "values": { @@ -134,7 +134,7 @@ This Task takes in one or more Tools which the LLM will decide to use through Ch } ] [08/12/24 15:16:37] INFO Subtask ee5f11666ded4dc39b94e4c59d18fbc7 - Response: Output of "PromptSummaryClient.summarize" was stored in memory with memory_name "TaskMemory" and artifact_namespace + Response: Output of "PromptSummaryTool.summarize" was stored in memory with memory_name "TaskMemory" and artifact_namespace "669d29a704444176be93d09d014298df" [08/12/24 15:16:38] INFO Subtask d9b2dd9f96d841f49f5d460e33905183 Actions: [ diff --git a/docs/griptape-framework/tools/index.md b/docs/griptape-framework/tools/index.md index 2cc149854..d97a9347c 100644 --- a/docs/griptape-framework/tools/index.md +++ b/docs/griptape-framework/tools/index.md @@ -41,7 +41,7 @@ Here is an example of a Pipeline using Tools: Actions: [ { "tag": "call_0VOTEvinRer7rG4oEirBYcow", - "name": "PromptSummaryClient", + "name": "PromptSummaryTool", "path": "summarize", "input": { "values": { diff --git a/docs/griptape-tools/official-tools/prompt-summary-client.md b/docs/griptape-tools/official-tools/prompt-summary-client.md index 16becee8c..2315114eb 100644 --- a/docs/griptape-tools/official-tools/prompt-summary-client.md +++ b/docs/griptape-tools/official-tools/prompt-summary-client.md @@ -3,7 +3,7 @@ The [RagClient](../../reference/griptape/tools/rag_client/tool.md) enables LLMs Here is an example of how it can be used with a local vector store driver: ```python ---8<-- "docs/griptape-tools/official-tools/src/prompt_summary_client_1.py" +--8<-- "docs/griptape-tools/official-tools/src/prompt_summary_tool_1.py" ``` ``` [08/12/24 15:54:46] INFO ToolkitTask 8be73eb542c44418ba880399044c017a @@ -28,7 +28,7 @@ Here is an example of how it can be used with a local vector store driver: Actions: [ { "tag": "call_DK3a4MYoElJbaCrUJekBReIc", - "name": "PromptSummaryClient", + "name": "PromptSummaryTool", "path": "summarize", "input": { "values": { diff --git a/docs/griptape-tools/official-tools/src/image_query_tool_1.py b/docs/griptape-tools/official-tools/src/image_query_tool_1.py index 032a6a4c2..a4d69eafb 100644 --- a/docs/griptape-tools/official-tools/src/image_query_tool_1.py +++ b/docs/griptape-tools/official-tools/src/image_query_tool_1.py @@ -11,7 +11,7 @@ image_query_driver=driver, ) -# Create an Image Query Client configured to use the engine. +# Create an Image Query Tool configured to use the engine. tool = ImageQueryTool( image_query_engine=engine, ) diff --git a/docs/griptape-tools/official-tools/web-scraper-tool.md b/docs/griptape-tools/official-tools/web-scraper-tool.md index 8bbea1465..26b83f6e3 100644 --- a/docs/griptape-tools/official-tools/web-scraper-tool.md +++ b/docs/griptape-tools/official-tools/web-scraper-tool.md @@ -28,7 +28,7 @@ This tool enables LLMs to scrape web pages for full text, summaries, authors, ti Actions: [ { "tag": "call_6Dovx2GKE2GLjaYIuwXvBxVn", - "name": "PromptSummaryClient", + "name": "PromptSummaryTool", "path": "summarize", "input": { "values": { diff --git a/mkdocs.yml b/mkdocs.yml index 7a7b2e25d..68f5c2dfb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -157,9 +157,9 @@ nav: - Audio Transcription: "griptape-tools/official-tools/audio-transcription-tool.md" - Griptape Cloud Knowledge Base: "griptape-tools/official-tools/griptape-cloud-knowledge-base-tool.md" - Rag: "griptape-tools/official-tools/rag-tool.md" - - ExtractionTool: "griptape-tools/official-tools/extraction-client.md" - - QueryTool: "griptape-tools/official-tools/query-client.md" - - PromptSummaryClient: "griptape-tools/official-tools/prompt-summary-client.md" + - Extraction: "griptape-tools/official-tools/extraction-client.md" + - Query: "griptape-tools/official-tools/query-client.md" + - Prompt Summary: "griptape-tools/official-tools/prompt-summary-client.md" - Custom Tools: - Building Custom Tools: "griptape-tools/custom-tools/index.md" - Recipes: diff --git a/tests/integration/tasks/test_toolkit_task.py b/tests/integration/tasks/test_toolkit_task.py index e3b6d5399..50b4f2a97 100644 --- a/tests/integration/tasks/test_toolkit_task.py +++ b/tests/integration/tasks/test_toolkit_task.py @@ -1,6 +1,5 @@ import pytest -from griptape.tools import WebSearchTool from tests.utils.structure_tester import StructureTester @@ -15,7 +14,7 @@ def structure_tester(self, request): from griptape.drivers import GoogleWebSearchDriver from griptape.structures import Agent - from griptape.tools import PromptSummaryTool, WebScraperTool + from griptape.tools import PromptSummaryTool, WebScraperTool, WebSearchTool return StructureTester( Agent( diff --git a/tests/unit/tools/test_prompt_summary_client.py b/tests/unit/tools/test_prompt_summary_client.py index 0053e0645..81a03acf5 100644 --- a/tests/unit/tools/test_prompt_summary_client.py +++ b/tests/unit/tools/test_prompt_summary_client.py @@ -7,7 +7,7 @@ from tests.utils import defaults -class TestPromptSummaryClient: +class TestPromptSummaryTool: @pytest.fixture() def tool(self): return PromptSummaryTool(