Skip to content

Commit

Permalink
Rename tool
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed May 2, 2024
1 parent 70eb6db commit 46c4d0c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `MediaArtifact` as a base class for `ImageArtifact` and future media Artifacts.
- Optional `exception` field to `ErrorArtifact`.
- `GriptapeCloudStructureRunClient` Tool for invoking Griptape Cloud Structure Run APIs.
- `GriptapeStructureRunClient` Tool for through a Tool.
- `GriptapeStructureRunner` Tool for through a Tool.
- `StructureRunTask` for running Structures as a Task.

### Changed
Expand Down
4 changes: 2 additions & 2 deletions griptape/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from .outpainting_image_generation_client.tool import OutpaintingImageGenerationClient
from .griptape_cloud_knowledge_base_client.tool import GriptapeCloudKnowledgeBaseClient
from .griptape_cloud_structure_run_client.tool import GriptapeCloudStructureRunClient
from .griptape_structure_run_client.tool import GriptapeStructureRunClient
from .griptape_structure_runner.tool import GriptapeStructureRunner
from .image_query_client.tool import ImageQueryClient

__all__ = [
Expand Down Expand Up @@ -56,6 +56,6 @@
"OutpaintingImageGenerationClient",
"GriptapeCloudKnowledgeBaseClient",
"GriptapeCloudStructureRunClient",
"GriptapeStructureRunClient",
"GriptapeStructureRunner",
"ImageQueryClient",
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: "v1"
name: Griptape Structure Run Client
name: Griptape Structure Runner
description: Tool for running a Griptape Structure.
contact_email: [email protected]
legal_info_url: https://www.griptape.ai/legal
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


@define
class GriptapeStructureRunClient(BaseTool):
class GriptapeStructureRunner(BaseTool):
"""
Attributes:
description: A description of what the Structure does.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import pytest
from griptape.tools import GriptapeStructureRunClient
from griptape.tools import GriptapeStructureRunner
from griptape.structures import Agent
from tests.mocks.mock_prompt_driver import MockPromptDriver


class TestGriptapeStructureRunClient:
class TestGriptapeStructureRunner:
@pytest.fixture
def client(self):
driver = MockPromptDriver()
agent = Agent(prompt_driver=driver)

return GriptapeStructureRunClient(structure=agent, description="fizz buzz")
return GriptapeStructureRunner(structure=agent, description="fizz buzz")

def test_run_structure(self, client):
assert client.run_structure({"values": {"args": "foo bar"}}).value == "mock output"

0 comments on commit 46c4d0c

Please sign in to comment.