mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-05 07:08:03 +00:00
Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
21 lines
517 B
Python
21 lines
517 B
Python
"""Base class for Office 365 tools."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from langchain_core.tools import BaseTool
|
|
from pydantic import Field
|
|
|
|
from langchain_community.tools.office365.utils import authenticate
|
|
|
|
if TYPE_CHECKING:
|
|
from O365 import Account
|
|
|
|
|
|
class O365BaseTool(BaseTool): # type: ignore[override]
|
|
"""Base class for the Office 365 tools."""
|
|
|
|
account: Account = Field(default_factory=authenticate)
|
|
"""The account object for the Office 365 account."""
|