Chris4K commited on
Commit
79f852c
1 Parent(s): 1194e65

Update random_charactor_generator.py

Browse files
Files changed (1) hide show
  1. random_charactor_generator.py +5 -3
random_charactor_generator.py CHANGED
@@ -1,8 +1,10 @@
1
  import requests
 
2
 
3
- class RandomCharatorGeneratorTool:
 
4
  name = "random_character"
5
- description = "This tool fetches a random character from the 'https://randomuser.me/api/' open API."
6
 
7
  inputs = ["text"] # Adding an empty list for inputs
8
 
@@ -32,7 +34,7 @@ class RandomCharatorGeneratorTool:
32
 
33
  self.is_initialized = True
34
 
35
- def __call__(self, prompt:str):
36
  if not self.is_initialized:
37
  self.setup()
38
 
 
1
  import requests
2
+ from transformers import Tool
3
 
4
+
5
+ class RandomCharatorGeneratorTool(Tool):
6
  name = "random_character"
7
+ description = "This tool generates a random character based on an input."
8
 
9
  inputs = ["text"] # Adding an empty list for inputs
10
 
 
34
 
35
  self.is_initialized = True
36
 
37
+ def __call__(self, input:str):
38
  if not self.is_initialized:
39
  self.setup()
40