base_griptape_cloud_tool
Adapted from the Griptape AI Framework documentation.
Bases:
BaseTool
, ABC
Attributes
Name | Type | Description |
---|---|---|
base_url | str | Base URL for the Gen AI Builder Knowledge Base API. |
api_key | Optional[str] | API key for Gen AI Builder. |
headers | dict | Headers for the Gen AI Builder Knowledge Base API. |
Source Code in griptape/tools/base_griptape_cloud_tool.py
@define class BaseGriptapeCloudTool(BaseTool, ABC): """Base class for Gen AI Builder clients. Attributes: base_url: Base URL for the Gen AI Builder Knowledge Base API. api_key: API key for Gen AI Builder. headers: Headers for the Gen AI Builder Knowledge Base API. """ base_url: str = field( default=Factory(lambda: os.getenv("GT_CLOUD_BASE_URL", "https://cloud.griptape.ai")), kw_only=True, ) api_key: Optional[str] = field(default=Factory(lambda: os.getenv("GT_CLOUD_API_KEY")), kw_only=True) headers: dict = field( default=Factory(lambda self: {"Authorization": f"Bearer {self.api_key}"}, takes_self=True), kw_only=True, )
api_key = field(default=Factory(lambda: os.getenv('GT_CLOUD_API_KEY')), kw_only=True)
class-attribute instance-attributebase_url = field(default=Factory(lambda: os.getenv('GT_CLOUD_BASE_URL', 'https://cloud.griptape.ai')), kw_only=True)
class-attribute instance-attributeheaders = field(default=Factory(lambda self: {'Authorization': f'Bearer {self.api_key}'}, takes_self=True), kw_only=True)
class-attribute instance-attribute
- On this page
- Attributes
Could this page be better? Report a problem or suggest an addition!