muddokon commited on
Commit
e0dcf1a
·
verified ·
1 Parent(s): ff9510b

Update tools/get_pokemon_info.py

Browse files

Added detailed instructions for tool

Files changed (1) hide show
  1. tools/get_pokemon_info.py +26 -2
tools/get_pokemon_info.py CHANGED
@@ -7,11 +7,35 @@ import pokebase as pb
7
 
8
  class GetPokemonInfoTool(Tool):
9
  name = "Get Pokemon Info"
10
- description = "Retrieves complete information on a given Pokemon. Use this to get all info for a pokemon."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  inputs = {'name': {'type': 'string', 'description': 'The name of the pokemon.'}}
12
  output_type = "object"
13
 
14
- def forward(self, url: str) -> object:
15
  try:
16
  import pokebase as pb
17
  pokemon = pb.APIResource('pokemon', name)
 
7
 
8
  class GetPokemonInfoTool(Tool):
9
  name = "Get Pokemon Info"
10
+ description = """"
11
+ Retrieves complete information on a given Pokemon. Use this to get information for a pokemon. It will return a python object where you can then find the following object properties, eacho one is described as name, description and type:
12
+ Name Description Type
13
+ id The identifier for this resource. integer
14
+ name The name for this resource. string
15
+ base_experience The base experience gained for defeating this Pokémon. integer
16
+ height The height of this Pokémon in decimetres. integer
17
+ is_default Set for exactly one Pokémon used as the default for each species. boolean
18
+ order Order for sorting. Almost national order, except families are grouped together. integer
19
+ weight The weight of this Pokémon in hectograms. integer
20
+ abilities A list of abilities this Pokémon could potentially have. list PokemonAbility
21
+ forms A list of forms this Pokémon can take on. list NamedAPIResource (PokemonForm)
22
+ game_indices A list of game indices relevent to Pokémon item by generation. list VersionGameIndex
23
+ held_items A list of items this Pokémon may be holding when encountered. list PokemonHeldItem
24
+ location_area_encounters A link to a list of location areas, as well as encounter details pertaining to specific versions. string
25
+ moves A list of moves along with learn methods and level details pertaining to specific version groups. list PokemonMove
26
+ past_types A list of details showing types this pokémon had in previous generations list PokemonTypePast
27
+ sprites A set of sprites used to depict this Pokémon in the game. A visual representation of the various sprites can be found at PokeAPI/sprites PokemonSprites
28
+ cries A set of cries used to depict this Pokémon in the game. A visual representation of the various cries can be found at PokeAPI/cries PokemonCries
29
+ species The species this Pokémon belongs to. NamedAPIResource (PokemonSpecies)
30
+ stats A list of base stat values for this Pokémon. list PokemonStat
31
+ types A list of details showing types this Pokémon has. list PokemonType
32
+ """
33
+ #All info gathered from pokeapi v2 official documentation
34
+
35
  inputs = {'name': {'type': 'string', 'description': 'The name of the pokemon.'}}
36
  output_type = "object"
37
 
38
+ def forward(self, name: str) -> object:
39
  try:
40
  import pokebase as pb
41
  pokemon = pb.APIResource('pokemon', name)