agazo commited on
Commit
ad0f6d8
·
verified ·
1 Parent(s): dff08c2

Update npb_tool.py

Browse files
Files changed (1) hide show
  1. npb_tool.py +1 -26
npb_tool.py CHANGED
@@ -11,34 +11,9 @@ from typing import Optional
11
  npb_agent = NpbAgent()
12
 
13
  @tool
14
- def npb_players(question: str) -> str:
15
  """
16
  Use this tool to answer questions about Nippon Professional Baseball (NPB) players,
17
  such as their team, jersey number, stats, or other biographical info.
18
  """
19
  return npb_agent(question)
20
-
21
-
22
- @tool
23
- def list_npb_players(player: str, season: str) -> str:
24
- """
25
- Retrieves a list of Nippon Professional Baseball (NPB) players for a specific team and season.
26
- Each entry includes:
27
- - Full name
28
- - Jersey number
29
- - Position/role (e.g., pitcher, catcher)
30
- - Team name
31
-
32
- Parameters:
33
- - team (str): The name of the NPB team to query (e.g., "Hanshin Tigers").
34
- - season (str): The target season/year (e.g., "2024").
35
-
36
- Returns:
37
- - str: A formatted list of player information, or an error message if no data is found.
38
- """
39
-
40
- prompt = f"""
41
- I need a list containing the players for the same team of play {player} and season {season} in the NPB. Each entry must contain full name, jersey number, role and team name.
42
- """
43
-
44
- return npb_agent(prompt)
 
11
  npb_agent = NpbAgent()
12
 
13
  @tool
14
+ def npb(question: str) -> str:
15
  """
16
  Use this tool to answer questions about Nippon Professional Baseball (NPB) players,
17
  such as their team, jersey number, stats, or other biographical info.
18
  """
19
  return npb_agent(question)