Skip to content

Commit 7f61626

Browse files
committed
Change model to Gemini for summary
1 parent cb4f11c commit 7f61626

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

services/summarization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
3. If the audiobook covers 40 points, summarize the 40 points. If it covers 10 points, summarize the 10 points. If it is unclear use that heuristic: take the Key points discussed and focus on 5 to 10 bullet points depending of the number of topics/laws/concepts/ideas/points covered.
1717
4. Any important conclusions or takeaways. A paragraph of about 3 to 5 sentences.
1818
19-
Keep the summary clear, well-structured, and informative.
19+
Keep the summary clear, well-structured, and informative. Remove all sponsorship mentions, ads, and unrelated tangents.
2020
2121
Transcript:
2222
{transcript}
@@ -104,7 +104,7 @@ def _summarize_with_gemini(transcript: str, video_id: str) -> str:
104104

105105
# Generate content using the new API
106106
response = client.models.generate_content(
107-
model="gemini-1.5-flash",
107+
model="gemini-3-flash-preview",
108108
contents=prompt, # Using cost-effective model
109109
)
110110

services/weekly_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def generate_weekly_summary_gemini(summaries: List[Dict[str, str]]) -> Optional[
406406
Write in markdown format. Be insightful, synthesis-focused, and highlight connections between books."""
407407

408408
response = client.models.generate_content(
409-
model="gemini-1.5-pro", # Use Pro for better quality
409+
model="gemini-3-pro-preview", # Using advanced Gemini model
410410
contents=prompt,
411411
)
412412

tests/services/test_summarization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def test_summarize_with_gemini_success(self, mock_config, mock_genai_class):
160160
# Verify API call
161161
mock_client.models.generate_content.assert_called_once()
162162
call_args = mock_client.models.generate_content.call_args
163-
assert call_args[1]["model"] == "gemini-1.5-flash"
163+
assert call_args[1]["model"] == "gemini-3-flash-preview"
164164
assert "Test transcript" in call_args[1]["contents"]
165165

166166
@patch("services.summarization.genai.Client")

0 commit comments

Comments
 (0)