mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
893a924b90
Thank you for contributing to LangChain! - [ ] **PR title**: "core: move BaseChatLoader and BaseToolkit from community" - [ ] **PR message**: move BaseChatLoader and BaseToolkit --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""MultiOn agent."""
|
|
from __future__ import annotations
|
|
|
|
from typing import List
|
|
|
|
from langchain_core.tools import BaseToolkit
|
|
|
|
from langchain_community.tools import BaseTool
|
|
from langchain_community.tools.multion.close_session import MultionCloseSession
|
|
from langchain_community.tools.multion.create_session import MultionCreateSession
|
|
from langchain_community.tools.multion.update_session import MultionUpdateSession
|
|
|
|
|
|
class MultionToolkit(BaseToolkit):
|
|
"""Toolkit for interacting with the Browser Agent.
|
|
|
|
**Security Note**: This toolkit contains tools that interact with the
|
|
user's browser via the multion API which grants an agent
|
|
access to the user's browser.
|
|
|
|
Please review the documentation for the multion API to understand
|
|
the security implications of using this toolkit.
|
|
|
|
See https://python.langchain.com/docs/security for more information.
|
|
"""
|
|
|
|
class Config:
|
|
"""Pydantic config."""
|
|
|
|
arbitrary_types_allowed = True
|
|
|
|
def get_tools(self) -> List[BaseTool]:
|
|
"""Get the tools in the toolkit."""
|
|
return [MultionCreateSession(), MultionUpdateSession(), MultionCloseSession()]
|