mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-18 08:03:36 +00:00
community[patch]: docstrings update (#20301)
Added missed docstrings. Format docstings to the consistent form.
This commit is contained in:
@@ -8,8 +8,8 @@ from langchain_core.tools import BaseTool
|
||||
|
||||
|
||||
class CogniswitchKnowledgeRequest(BaseTool):
|
||||
"""
|
||||
A tool for interacting with the Cogniswitch service to answer questions.
|
||||
"""Tool that uses the Cogniswitch service to answer questions.
|
||||
|
||||
name: str = "cogniswitch_knowledge_request"
|
||||
description: str = (
|
||||
"A wrapper around cogniswitch service to answer the question
|
||||
@@ -81,9 +81,9 @@ class CogniswitchKnowledgeRequest(BaseTool):
|
||||
|
||||
|
||||
class CogniswitchKnowledgeStatus(BaseTool):
|
||||
"""
|
||||
A cogniswitch tool for interacting with the Cogniswitch services to know the
|
||||
"""Tool that uses the Cogniswitch services to get the
|
||||
status of the document or url uploaded.
|
||||
|
||||
name: str = "cogniswitch_knowledge_status"
|
||||
description: str = (
|
||||
"A wrapper around cogniswitch services to know the status of
|
||||
@@ -181,8 +181,8 @@ class CogniswitchKnowledgeStatus(BaseTool):
|
||||
|
||||
|
||||
class CogniswitchKnowledgeSourceFile(BaseTool):
|
||||
"""
|
||||
A cogniswitch tool for interacting with the Cogniswitch services to store data.
|
||||
"""Tool that uses the Cogniswitch services to store data from file.
|
||||
|
||||
name: str = "cogniswitch_knowledge_source_file"
|
||||
description: str = (
|
||||
"This calls the CogniSwitch services to analyze & store data from a file.
|
||||
@@ -294,8 +294,8 @@ class CogniswitchKnowledgeSourceFile(BaseTool):
|
||||
|
||||
|
||||
class CogniswitchKnowledgeSourceURL(BaseTool):
|
||||
"""
|
||||
A cogniswitch tool for interacting with the Cogniswitch services to store data.
|
||||
"""Tool that uses the Cogniswitch services to store data from a URL.
|
||||
|
||||
name: str = "cogniswitch_knowledge_source_url"
|
||||
description: str = (
|
||||
"This calls the CogniSwitch services to analyze & store data from a url.
|
||||
|
@@ -10,8 +10,8 @@ from langchain_community.tools.connery.tool import ConneryAction
|
||||
|
||||
|
||||
class ConneryService(BaseModel):
|
||||
"""
|
||||
A service for interacting with the Connery Runner API.
|
||||
"""Service for interacting with the Connery Runner API.
|
||||
|
||||
It gets the list of available actions from the Connery Runner,
|
||||
wraps them in ConneryAction Tools and returns them to the user.
|
||||
It also provides a method for running the actions.
|
||||
|
@@ -13,9 +13,7 @@ from langchain_community.tools.connery.models import Action, Parameter
|
||||
|
||||
|
||||
class ConneryAction(BaseTool):
|
||||
"""
|
||||
A LangChain Tool wrapping a Connery Action.
|
||||
"""
|
||||
"""Connery Action tool."""
|
||||
|
||||
name: str
|
||||
description: str
|
||||
|
@@ -54,7 +54,7 @@ class SearchEventsInput(BaseModel):
|
||||
|
||||
|
||||
class O365SearchEvents(O365BaseTool):
|
||||
"""Class for searching calendar events in Office 365
|
||||
"""Search calendar events in Office 365.
|
||||
|
||||
Free, but setup is required
|
||||
"""
|
||||
|
@@ -53,9 +53,9 @@ class SearchEmailsInput(BaseModel):
|
||||
|
||||
|
||||
class O365SearchEmails(O365BaseTool):
|
||||
"""Class for searching email messages in Office 365
|
||||
"""Search email messages in Office 365.
|
||||
|
||||
Free, but setup is required
|
||||
Free, but setup is required.
|
||||
"""
|
||||
|
||||
name: str = "messages_search"
|
||||
|
@@ -32,7 +32,7 @@ class SendMessageSchema(BaseModel):
|
||||
|
||||
|
||||
class O365SendMessage(O365BaseTool):
|
||||
"""Tool for sending an email in Office 365."""
|
||||
"""Send an email in Office 365."""
|
||||
|
||||
name: str = "send_email"
|
||||
description: str = (
|
||||
|
@@ -36,7 +36,7 @@ def clean_body(body: str) -> str:
|
||||
|
||||
|
||||
def authenticate() -> Account:
|
||||
"""Authenticate using the Microsoft Grah API"""
|
||||
"""Authenticate using the Microsoft Graph API"""
|
||||
try:
|
||||
from O365 import Account
|
||||
except ImportError as e:
|
||||
|
@@ -12,11 +12,13 @@ from langchain_community.utilities.you import YouSearchAPIWrapper
|
||||
|
||||
|
||||
class YouInput(BaseModel):
|
||||
"""Input schema for the you.com tool."""
|
||||
|
||||
query: str = Field(description="should be a search query")
|
||||
|
||||
|
||||
class YouSearchTool(BaseTool):
|
||||
"""Tool that searches the you.com API"""
|
||||
"""Tool that searches the you.com API."""
|
||||
|
||||
name = "you_search"
|
||||
description = (
|
||||
|
@@ -82,8 +82,9 @@ from langchain_community.utilities.zapier import ZapierNLAWrapper
|
||||
|
||||
|
||||
class ZapierNLARunAction(BaseTool):
|
||||
"""
|
||||
Args:
|
||||
"""Tool to run a specific action from the user's exposed actions.
|
||||
|
||||
Params:
|
||||
action_id: a specific action ID (from list actions) of the action to execute
|
||||
(the set api_key must be associated with the action owner)
|
||||
instructions: a natural language instruction string for using the action
|
||||
@@ -167,11 +168,7 @@ ZapierNLARunAction.__doc__ = (
|
||||
|
||||
|
||||
class ZapierNLAListActions(BaseTool):
|
||||
"""
|
||||
Args:
|
||||
None
|
||||
|
||||
"""
|
||||
"""Tool to list all exposed actions for the user."""
|
||||
|
||||
name: str = "ZapierNLA_list_actions"
|
||||
description: str = BASE_ZAPIER_TOOL_PROMPT + (
|
||||
|
Reference in New Issue
Block a user