mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
19 lines
435 B
Python
19 lines
435 B
Python
|
"""Base class for Amadeus tools."""
|
||
|
from __future__ import annotations
|
||
|
|
||
|
from typing import TYPE_CHECKING
|
||
|
|
||
|
from langchain_core.pydantic_v1 import Field
|
||
|
from langchain_core.tools import BaseTool
|
||
|
|
||
|
from langchain_community.tools.amadeus.utils import authenticate
|
||
|
|
||
|
if TYPE_CHECKING:
|
||
|
from amadeus import Client
|
||
|
|
||
|
|
||
|
class AmadeusBaseTool(BaseTool):
|
||
|
"""Base Tool for Amadeus."""
|
||
|
|
||
|
client: Client = Field(default_factory=authenticate)
|