Skip to content

Base griptape cloud client

BaseGriptapeCloudClient

Bases: BaseTool, ABC

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_client.py
@define
class BaseGriptapeCloudClient(BaseTool, ABC):
    """
    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