kuro223 commited on
Commit
972f1bd
·
1 Parent(s): 9f6e9e1

jojdgldsoppkhh

Browse files
Files changed (3) hide show
  1. .env +1 -0
  2. app.py +0 -19
  3. templates/index.html +1 -1
.env CHANGED
@@ -1,3 +1,4 @@
1
  # Configuration pour Chatm2
2
  # Obtenez votre clé API Google Gemini sur https://aistudio.google.com/app/apikey
 
3
  GOOGLE_API_KEY=votre_cle_api_ici
 
1
  # Configuration pour Chatm2
2
  # Obtenez votre clé API Google Gemini sur https://aistudio.google.com/app/apikey
3
+ # Remplacez cette valeur par votre vraie clé API
4
  GOOGLE_API_KEY=votre_cle_api_ici
app.py CHANGED
@@ -174,25 +174,6 @@ def chat():
174
  return
175
 
176
  print(f"Démarrage du streaming pour conversation {conversation_id}")
177
-
178
- # TEST: Simulation de réponse pour debug
179
- import time
180
- test_response = "Bonjour ! Je suis Mariam, votre assistant IA. Comment puis-je vous aider aujourd'hui ?"
181
- for i, char in enumerate(test_response):
182
- yield f"data: {json.dumps({'type': 'text', 'content': char})}\n\n"
183
- time.sleep(0.01) # Petit délai pour simuler le streaming
184
-
185
- print(f"Test streaming terminé, réponse complète: {len(test_response)} caractères")
186
-
187
- # Ajouter la réponse de l'assistant à l'historique
188
- add_message_to_history(conversation_id, 'assistant', test_response)
189
-
190
- # Signal de fin
191
- yield f"data: {json.dumps({'type': 'end'})}\n\n"
192
-
193
- return
194
-
195
- # CODE ORIGINAL COMMENTÉ POUR TEST
196
  response_stream = chat.send_message_stream(
197
  message,
198
  config=generation_config
 
174
  return
175
 
176
  print(f"Démarrage du streaming pour conversation {conversation_id}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  response_stream = chat.send_message_stream(
178
  message,
179
  config=generation_config
templates/index.html CHANGED
@@ -27,7 +27,7 @@
27
  <style>
28
  /* Configuration Marked pour le markdown */
29
  .markdown-content {
30
- @apply text-white leading-relaxed; /* Changé temporairement pour debug */
31
  }
32
  .markdown-content h1, .markdown-content h2, .markdown-content h3 {
33
  @apply font-bold mb-2 mt-4;
 
27
  <style>
28
  /* Configuration Marked pour le markdown */
29
  .markdown-content {
30
+ @apply text-dark-text leading-relaxed;
31
  }
32
  .markdown-content h1, .markdown-content h2, .markdown-content h3 {
33
  @apply font-bold mb-2 mt-4;