chaido commited on
Commit
949cbd4
·
verified ·
1 Parent(s): 6340ee6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -49,8 +49,11 @@ def rag_response(query):
49
  Ερώτηση : {query} Πλαίσιο : {top_doct}"""
50
 
51
  try:
52
- response = genai.generate_content(augmented_prompt)
53
- return response.text
 
 
 
54
  except Exception as e:
55
  return f"Σφάλμα: {str(e)}"
56
 
 
49
  Ερώτηση : {query} Πλαίσιο : {top_doct}"""
50
 
51
  try:
52
+ response = genai.generate_text(
53
+ model="text-bison-001", # Επιβεβαίωσε ότι το μοντέλο είναι σωστό
54
+ prompt=augmented_prompt
55
+ )
56
+ return response.result # Εξαρτάται από τη δομή του αντικειμένου απάντησης
57
  except Exception as e:
58
  return f"Σφάλμα: {str(e)}"
59