lukmanaj commited on
Commit
01f06e9
·
verified ·
1 Parent(s): 5245852

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -51,9 +51,10 @@ class GeminiModel:
51
  contents=[{"role": "user", "parts": [{"text": prompt}]}],
52
  generation_config=self.generation_config
53
  )
54
- return response.candidates[0].content.parts[0].text.strip()
 
55
  except Exception as e:
56
- return f"Error during Gemini call: {str(e)}"
57
 
58
  # Define BasicAgent properly
59
  class BasicAgent:
 
51
  contents=[{"role": "user", "parts": [{"text": prompt}]}],
52
  generation_config=self.generation_config
53
  )
54
+ # Return a dictionary that CodeAgent expects
55
+ return {"content": response.candidates[0].content.parts[0].text.strip()}
56
  except Exception as e:
57
+ return {"content": f"Error during Gemini call: {str(e)}"}"
58
 
59
  # Define BasicAgent properly
60
  class BasicAgent: