mgbam commited on
Commit
8e4b913
·
verified ·
1 Parent(s): e446a42

Update app/gemini_analyzer.py

Browse files
Files changed (1) hide show
  1. app/gemini_analyzer.py +6 -1
app/gemini_analyzer.py CHANGED
@@ -10,6 +10,12 @@ This module provides structured analysis of financial text, including:
10
  import os
11
  import logging
12
  import httpx
 
 
 
 
 
 
13
  from typing import Optional, TypedDict, List
14
 
15
  # Configure logging
@@ -41,7 +47,6 @@ class GeminiAnalyzer:
41
 
42
  def _build_prompt(self, text: str) -> dict:
43
  """Creates the structured JSON prompt for the Gemini API."""
44
- # This is where the magic happens. We're "prompt engineering" Gemini.
45
  return {
46
  "contents": [{
47
  "parts": [{
 
10
  import os
11
  import logging
12
  import httpx
13
+ # ====================================================================
14
+ # FIX APPLIED HERE
15
+ # ====================================================================
16
+ # Import the missing 'json' module
17
+ import json
18
+ # ====================================================================
19
  from typing import Optional, TypedDict, List
20
 
21
  # Configure logging
 
47
 
48
  def _build_prompt(self, text: str) -> dict:
49
  """Creates the structured JSON prompt for the Gemini API."""
 
50
  return {
51
  "contents": [{
52
  "parts": [{