yannis2025 commited on
Commit
b00e015
·
verified ·
1 Parent(s): 4300f02

Delete tools.py

Browse files
Files changed (1) hide show
  1. tools.py +0 -27
tools.py DELETED
@@ -1,27 +0,0 @@
1
- class MathTool:
2
- name = "calculator"
3
- description = "Useful for answering math questions."
4
-
5
- def __init__(self, llm):
6
- self.llm = llm
7
-
8
- def run(self, query: str) -> str:
9
- prompt = f"""You are a calculator. Solve the following math problem:
10
- {query}
11
- Answer:"""
12
- return self.llm(prompt).strip()
13
-
14
-
15
- class WikipediaTool:
16
- name = "wikipedia"
17
- description = "Useful for looking up general knowledge."
18
-
19
- def __init__(self, llm):
20
- self.llm = llm
21
-
22
- def run(self, query: str) -> str:
23
- prompt = f"""You are an expert researcher with access to Wikipedia.
24
- Look up information to answer the following question:
25
- {query}
26
- Return a concise paragraph:"""
27
- return self.llm(prompt).strip()