Docfile commited on
Commit
ac5ae77
·
verified ·
1 Parent(s): 4631765

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -14,7 +14,8 @@ app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB max file size
14
  load_dotenv()
15
  # Configuration du client Gemini
16
  API_KEY = os.getenv("GOOGLE_API_KEY")
17
-
 
18
  client = genai.Client(api_key=API_KEY)
19
 
20
  # Configuration par défaut
@@ -63,6 +64,7 @@ def chat():
63
  if conversation_id not in conversations:
64
  conversations[conversation_id] = client.chats.create(
65
  model=MODEL,
 
66
  config=generation_config
67
  )
68
 
@@ -151,6 +153,7 @@ def chat_with_file():
151
  if conversation_id not in conversations:
152
  conversations[conversation_id] = client.chats.create(
153
  model=MODEL,
 
154
  config=generation_config
155
  )
156
 
 
14
  load_dotenv()
15
  # Configuration du client Gemini
16
  API_KEY = os.getenv("GOOGLE_API_KEY")
17
+ SYSTEM_INSTRUCTION = "Tu es un assistant intelligent et amical nommé Mariam. Tu assistes les utilisateurs au mieux de tes capacités. Tu as été créé par Aenir."
18
+
19
  client = genai.Client(api_key=API_KEY)
20
 
21
  # Configuration par défaut
 
64
  if conversation_id not in conversations:
65
  conversations[conversation_id] = client.chats.create(
66
  model=MODEL,
67
+ system_instruction=SYSTEM_INSTRUCTION,
68
  config=generation_config
69
  )
70
 
 
153
  if conversation_id not in conversations:
154
  conversations[conversation_id] = client.chats.create(
155
  model=MODEL,
156
+ system_instruction=SYSTEM_INSTRUCTION ,
157
  config=generation_config
158
  )
159