albertCHY commited on
Commit
b16d221
·
verified ·
1 Parent(s): 5b57785

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +0 -44
agent.py CHANGED
@@ -33,46 +33,6 @@ def build_gemini_llm():
33
  raise ValueError("GOOGLE_API_KEY environment variable is not set.")
34
  return ChatGoogleGenerativeAI(model = "gemini-3.7-flash", temperature = 0, max_output_tokens = 1025, include_thoughts=True)
35
 
36
- @tool
37
- def add_numbers(a: int, b: int) -> int:
38
- """
39
- Adds two numbers and return the result.
40
- Args:
41
- a (int)
42
- b (int)
43
- """
44
- return a + b
45
-
46
- @tool
47
- def subtract_numbers(a: int, b: int) -> int:
48
- """
49
- Subtracts the second number from the first and return the result.
50
- Args:
51
- a (int)
52
- b (int)
53
- """
54
- return a - b
55
-
56
- @tool
57
- def multiply_numbers(a: int, b: int) -> int:
58
- """
59
- Multiplies two numbers and return the result.
60
- Args:
61
- a (int)
62
- b (int)
63
- """
64
- return a * b
65
-
66
- @tool
67
- def divide_numbers(a: int, b: int) -> float:
68
- """
69
- Divides the first number by the second and return the result.
70
- Args:
71
- a (int)
72
- b (int)
73
- """
74
- return a / b
75
-
76
  @tool
77
  def web_search(query:str) -> str:
78
  """
@@ -228,10 +188,6 @@ def wikipedia_search(query: str):
228
 
229
  model = build_gemini_llm()
230
  tools = [
231
- add_numbers,
232
- subtract_numbers,
233
- multiply_numbers,
234
- divide_numbers,
235
  extract_text_from_image,
236
  download_and_read_file,
237
  web_search,
 
33
  raise ValueError("GOOGLE_API_KEY environment variable is not set.")
34
  return ChatGoogleGenerativeAI(model = "gemini-3.7-flash", temperature = 0, max_output_tokens = 1025, include_thoughts=True)
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  @tool
37
  def web_search(query:str) -> str:
38
  """
 
188
 
189
  model = build_gemini_llm()
190
  tools = [
 
 
 
 
191
  extract_text_from_image,
192
  download_and_read_file,
193
  web_search,