mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-22 14:49:29 +00:00
Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
20 lines
444 B
Python
20 lines
444 B
Python
"""Base class for Amadeus tools."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from langchain_core.tools import BaseTool
|
|
from pydantic import Field
|
|
|
|
from langchain_community.tools.amadeus.utils import authenticate
|
|
|
|
if TYPE_CHECKING:
|
|
from amadeus import Client
|
|
|
|
|
|
class AmadeusBaseTool(BaseTool): # type: ignore[override]
|
|
"""Base Tool for Amadeus."""
|
|
|
|
client: Client = Field(default_factory=authenticate)
|