Skip to content

Commit

Permalink
Remove tools
Browse files Browse the repository at this point in the history
  • Loading branch information
BeatrixCohere committed Aug 9, 2024
1 parent 5f71460 commit ff63ce2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
66 changes: 33 additions & 33 deletions src/backend/config/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,39 +110,39 @@ class ToolName(StrEnum):
category=Category.Function,
description="Runs python code in a sandbox.",
),
ToolName.Wiki_Retriever_LangChain: ManagedTool(
display_name="Wikipedia",
implementation=LangChainWikiRetriever,
parameter_definitions={
"query": {
"description": "Query for retrieval.",
"type": "str",
"required": True,
}
},
kwargs={"chunk_size": 300, "chunk_overlap": 0},
is_visible=True,
is_available=LangChainWikiRetriever.is_available(),
error_message="LangChainWikiRetriever not available.",
category=Category.DataLoader,
description="Retrieves documents from Wikipedia using LangChain.",
),
ToolName.Calculator: ManagedTool(
display_name="Calculator",
implementation=Calculator,
parameter_definitions={
"code": {
"description": "The expression for the calculator to evaluate, it should be a valid mathematical expression.",
"type": "str",
"required": True,
}
},
is_visible=True,
is_available=Calculator.is_available(),
error_message="Calculator tool not available.",
category=Category.Function,
description="This is a powerful multi-purpose calculator which is capable of a wide array of math calculations.",
),
# ToolName.Wiki_Retriever_LangChain: ManagedTool(
# display_name="Wikipedia",
# implementation=LangChainWikiRetriever,
# parameter_definitions={
# "query": {
# "description": "Query for retrieval.",
# "type": "str",
# "required": True,
# }
# },
# kwargs={"chunk_size": 300, "chunk_overlap": 0},
# is_visible=True,
# is_available=LangChainWikiRetriever.is_available(),
# error_message="LangChainWikiRetriever not available.",
# category=Category.DataLoader,
# description="Retrieves documents from Wikipedia using LangChain.",
# ),
# ToolName.Calculator: ManagedTool(
# display_name="Calculator",
# implementation=Calculator,
# parameter_definitions={
# "code": {
# "description": "The expression for the calculator to evaluate, it should be a valid mathematical expression.",
# "type": "str",
# "required": True,
# }
# },
# is_visible=True,
# is_available=Calculator.is_available(),
# error_message="Calculator tool not available.",
# category=Category.Function,
# description="This is a powerful multi-purpose calculator which is capable of a wide array of math calculations.",
# ),
ToolName.Google_Drive: ManagedTool(
display_name="Google Drive",
implementation=GoogleDrive,
Expand Down
2 changes: 1 addition & 1 deletion src/backend/tools/google_drive/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class GoogleDrive(BaseTool):

@classmethod
def is_available(cls) -> bool:
return cls.CLIENT_ID is not None and cls.CLIENT_ID is not None
return cls.CLIENT_ID is not None and cls.CLIENT_SECRET is not None

def _handle_tool_specific_errors(cls, error: Exception, **kwargs: Any):
message = "[Google Drive] Tool Error: {}".format(str(error))
Expand Down

0 comments on commit ff63ce2

Please sign in to comment.