Update crew.py
Browse files
crew.py
CHANGED
@@ -207,21 +207,13 @@ def run_crew(question, file_path):
|
|
207 |
elif is_ext(file_path, ".pptx"):
|
208 |
file_data = read_pptx(file_path)
|
209 |
contents = [f"{question}\n{file_data}"]
|
210 |
-
print("###")
|
211 |
-
print(file_data)
|
212 |
-
print("###")
|
213 |
else:
|
214 |
file = client.files.upload(file=file_path)
|
215 |
contents = [file, question]
|
216 |
|
217 |
response = client.models.generate_content(
|
218 |
model=DOCUMENT_ANALYSIS_MODEL,
|
219 |
-
contents=contents
|
220 |
-
config=types.GenerateContentConfig(
|
221 |
-
thinking_config=types.ThinkingConfig(
|
222 |
-
thinking_budget=8196
|
223 |
-
)
|
224 |
-
)
|
225 |
)
|
226 |
|
227 |
return response.text
|
|
|
207 |
elif is_ext(file_path, ".pptx"):
|
208 |
file_data = read_pptx(file_path)
|
209 |
contents = [f"{question}\n{file_data}"]
|
|
|
|
|
|
|
210 |
else:
|
211 |
file = client.files.upload(file=file_path)
|
212 |
contents = [file, question]
|
213 |
|
214 |
response = client.models.generate_content(
|
215 |
model=DOCUMENT_ANALYSIS_MODEL,
|
216 |
+
contents=contents
|
|
|
|
|
|
|
|
|
|
|
217 |
)
|
218 |
|
219 |
return response.text
|