Skip to content

base_griptape_cloud_tool

BaseGriptapeCloudTool

Bases: BaseTool, ABC

Base class for Griptape Cloud clients.

Attributes:

Name Type Description
base_url str

Base URL for the Griptape Cloud Knowledge Base API.

api_key str

API key for Griptape Cloud.

headers dict

Headers for the Griptape Cloud Knowledge Base API.

Source code in griptape/tools/base_griptape_cloud_tool.py
@define
class BaseGriptapeCloudTool(BaseTool, ABC):
    """Base class for Griptape Cloud clients.

    Attributes:
        base_url: Base URL for the Griptape Cloud Knowledge Base API.
        api_key: API key for Griptape Cloud.
        headers: Headers for the Griptape Cloud Knowledge Base API.
    """

    base_url: str = field(default="https://cloud.griptape.ai", kw_only=True)
    api_key: str = field(kw_only=True)
    headers: dict = field(
        default=Factory(lambda self: {"Authorization": f"Bearer {self.api_key}"}, takes_self=True),
        kw_only=True,
    )

api_key: str = field(kw_only=True) class-attribute instance-attribute

base_url: str = field(default='https://cloud.griptape.ai', kw_only=True) class-attribute instance-attribute

headers: dict = field(default=Factory(lambda self: {'Authorization': f'Bearer {self.api_key}'}, takes_self=True), kw_only=True) class-attribute instance-attribute