civerson916 commited on
Commit
6d3aca9
·
verified ·
1 Parent(s): 0abe852

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -56
app.py CHANGED
@@ -29,11 +29,12 @@ BASE_PYTHON_TOOLS["open"] = open
29
  visit_webpage_tool = VisitWebpageTool()
30
  final_answer = FinalAnswerTool()
31
 
32
- model = LiteLLMModel(
33
- model_id="gemini/gemini-2.0-flash-lite",
34
- temperature=0.0,
35
- api_key=os.environ.get("GEMINI_KEY")
36
- )
 
37
 
38
  # Import tool from Hub
39
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
@@ -134,57 +135,6 @@ class AudioDescriptionTool(Tool):
134
  audio_description_tool = AudioDescriptionTool()
135
 
136
  # class FetchFileTool(Tool):
137
- # name = "file_saver"
138
- # description = """
139
- # This is a tool that will fetch an internet file and save content locally.
140
- # It takes a location, file path, file name, and content to save."""
141
- # inputs = {
142
- # "location": {
143
- # "type": "string",
144
- # "description": "The internet location of the file to fetch",
145
- # },
146
- # "file_extension": {
147
- # "type": "string",
148
- # "description": "Assumed file extension of the file to fetch, like mp3 or png for example",
149
- # },
150
- # "file_path": {
151
- # "type": "string",
152
- # "description": "The path to the directory where the file will be saved",
153
- # },
154
- # "file_name": {
155
- # "type": "string",
156
- # "description": "The name of the file where content will be saved",
157
- # }
158
- # }
159
- # output_type = "boolean"
160
-
161
- # def forward(self, location: str, file_extension: str, file_path: str, file_name: str):
162
- # try:
163
- # response = requests.get(location)
164
- # response.raise_for_status()
165
- # content = response.content
166
- # full_path = os.path.join(file_path, file_name)
167
- # with open(full_path, 'wb') as out_file:
168
- # out_file.write(content)
169
- # return True
170
-
171
- # except Exception as e:
172
- # # if error is HTTP 429 then copy from /files
173
- # if response.status_code == 429:
174
- # # get last part of location separated by slash
175
- # file_id = location.split('/')[-1]
176
- # local_path = f"files/{file_id}.{file_extension}"
177
- # print(f"Copying from: {local_path}")
178
-
179
- # full_path = os.path.join(file_path, file_name)
180
- # print(f"Copying to: {full_path}")
181
-
182
- # shutil.copy(local_path, full_path)
183
- # return True
184
- # else:
185
- # print(f"Error saving content to file: {e}")
186
- # return False
187
-
188
  # fetch_file_tool = FetchFileTool()
189
 
190
  class WikipediaSearchTool(Tool):
 
29
  visit_webpage_tool = VisitWebpageTool()
30
  final_answer = FinalAnswerTool()
31
 
32
+ # model = LiteLLMModel(
33
+ # model_id="gemini/gemini-2.0-flash-lite",
34
+ # temperature=0.0,
35
+ # api_key=os.environ.get("GEMINI_KEY")
36
+ # )
37
+ model = LiteLLMModel(model_id="openrouter/qwen/qwen3-30b-a3b:free")
38
 
39
  # Import tool from Hub
40
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
135
  audio_description_tool = AudioDescriptionTool()
136
 
137
  # class FetchFileTool(Tool):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  # fetch_file_tool = FetchFileTool()
139
 
140
  class WikipediaSearchTool(Tool):