wt002 commited on
Commit
8c99152
·
verified ·
1 Parent(s): df62ccf

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +3 -3
agent.py CHANGED
@@ -49,7 +49,7 @@ def analyze_audio_file(path_file_audio: str, query: str) -> str:
49
  str: The result of the analysis of audio.
50
  """
51
 
52
- client = genai.Client(api_key=os.getenv("API_KEY"))
53
 
54
  myfile = client.files.upload(file=path_file_audio)
55
 
@@ -73,7 +73,7 @@ def analyze_youtube_video(url_youtube_video: str, query: str) -> str:
73
  str: Result of the video analysis.
74
  """
75
 
76
- client = genai.Client(api_key=os.getenv("API_KEY"))
77
 
78
  response = client.models.generate_content(
79
  model=f"models/{os.getenv('GOOGLE_MODEL_ID')}",
@@ -101,7 +101,7 @@ def analyze_image_file(path_file_image: str, query: str) -> str:
101
  str: The result of the analysis of audio.
102
  """
103
 
104
- client = genai.Client(api_key=os.getenv("API_KEY"))
105
 
106
  myfile = client.files.upload(file=path_file_image)
107
 
 
49
  str: The result of the analysis of audio.
50
  """
51
 
52
+ client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
53
 
54
  myfile = client.files.upload(file=path_file_audio)
55
 
 
73
  str: Result of the video analysis.
74
  """
75
 
76
+ client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
77
 
78
  response = client.models.generate_content(
79
  model=f"models/{os.getenv('GOOGLE_MODEL_ID')}",
 
101
  str: The result of the analysis of audio.
102
  """
103
 
104
+ client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))
105
 
106
  myfile = client.files.upload(file=path_file_image)
107