llamasrock commited on
Commit
3b08c84
·
verified ·
1 Parent(s): c8c3f20

Update app.py

Browse files

corrected class type hint in get_file

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from google import genai
9
  from google.genai import types
10
  import asyncio
11
  import requests
12
- from typing import IO
13
 
14
  # (Keep Constants as is)
15
  # --- Constants ---
@@ -57,7 +57,7 @@ class BasicAgent:
57
  # return answer.text
58
 
59
  @tool
60
- def get_file(self: BasicAgent, task_id: str) -> IO:
61
  '''
62
  Downloads the file associated with the given task_id, if one exists and is mapped.
63
  If the question mentions an attachment, use this function.
 
9
  from google.genai import types
10
  import asyncio
11
  import requests
12
+ from typing import IO, type
13
 
14
  # (Keep Constants as is)
15
  # --- Constants ---
 
57
  # return answer.text
58
 
59
  @tool
60
+ def get_file(self: type[BasicAgent], task_id: str) -> IO:
61
  '''
62
  Downloads the file associated with the given task_id, if one exists and is mapped.
63
  If the question mentions an attachment, use this function.