Tesvia commited on
Commit
4f62d4c
·
verified ·
1 Parent(s): bf01cd0

Upload tools.py

Browse files
Files changed (1) hide show
  1. tools.py +22 -4
tools.py CHANGED
@@ -14,7 +14,11 @@ class PythonRunTool(Tool):
14
  Execute trusted Python code and return printed output + repr() of the last expression (or _result variable).
15
  """
16
  inputs = {
17
- "code": {"type": "string", "description": "Python code to execute", "required": True}
 
 
 
 
18
  }
19
  output_type = "string"
20
 
@@ -103,8 +107,18 @@ class AudioTranscriptionTool(Tool):
103
  Transcribe an audio file with OpenAI Whisper, returns plain text."
104
  """
105
  inputs = {
106
- "path": {"type": "string", "description": "Path to audio file", "required": True},
107
- "model": {"type": "string", "description": "Model name for transcription (default: whisper-1)", "required": False, "default": "whisper-1"}
 
 
 
 
 
 
 
 
 
 
108
  }
109
  output_type = "string"
110
 
@@ -124,7 +138,11 @@ class SimpleOCRTool(Tool):
124
  Return any text spotted in an image via pytesseract OCR.
125
  """
126
  inputs = {
127
- "path": {"type": "string", "description": "Path to image file", "required": True}
 
 
 
 
128
  }
129
  output_type = "string"
130
 
 
14
  Execute trusted Python code and return printed output + repr() of the last expression (or _result variable).
15
  """
16
  inputs = {
17
+ "code": {
18
+ "type": "string",
19
+ "description": "Python code to execute",
20
+ "required": True
21
+ }
22
  }
23
  output_type = "string"
24
 
 
107
  Transcribe an audio file with OpenAI Whisper, returns plain text."
108
  """
109
  inputs = {
110
+ "path": {
111
+ "type": "string",
112
+ "description": "Path to audio file",
113
+ "required": True
114
+ },
115
+ "model": {
116
+ "type": "string",
117
+ "description": "Model name for transcription (default: whisper-1)",
118
+ "required": False,
119
+ "default": "whisper-1",
120
+ "nullable": True
121
+ }
122
  }
123
  output_type = "string"
124
 
 
138
  Return any text spotted in an image via pytesseract OCR.
139
  """
140
  inputs = {
141
+ "path": {
142
+ "type": "string",
143
+ "description": "Path to image file",
144
+ "required": True
145
+ }
146
  }
147
  output_type = "string"
148