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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -51,6 +51,8 @@ def chat():
51
 
52
  # Configuration du thinking
53
  config_dict = DEFAULT_CONFIG.copy()
 
 
54
  if thinking_enabled:
55
  config_dict["thinking_config"] = types.ThinkingConfig(
56
  thinking_budget=-1, # Dynamic thinking
@@ -64,7 +66,7 @@ def chat():
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
 
@@ -147,13 +149,15 @@ def chat_with_file():
147
  )
148
 
149
  config_dict["tools"] = DEFAULT_TOOLS
 
 
150
  generation_config = types.GenerateContentConfig(**config_dict)
151
 
152
  # Gestion de la conversation
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
 
 
51
 
52
  # Configuration du thinking
53
  config_dict = DEFAULT_CONFIG.copy()
54
+ config_dict["system_instruction"] = SYSTEM_INSTRUCTION
55
+ # <<< FIN DE LA MODIFICATION >>>
56
  if thinking_enabled:
57
  config_dict["thinking_config"] = types.ThinkingConfig(
58
  thinking_budget=-1, # Dynamic thinking
 
66
  if conversation_id not in conversations:
67
  conversations[conversation_id] = client.chats.create(
68
  model=MODEL,
69
+
70
  config=generation_config
71
  )
72
 
 
149
  )
150
 
151
  config_dict["tools"] = DEFAULT_TOOLS
152
+ config_dict["system_instruction"] = SYSTEM_INSTRUCTION
153
+ # <<< FIN DE LA MODIFICATION >>>
154
  generation_config = types.GenerateContentConfig(**config_dict)
155
 
156
  # Gestion de la conversation
157
  if conversation_id not in conversations:
158
  conversations[conversation_id] = client.chats.create(
159
  model=MODEL,
160
+
161
  config=generation_config
162
  )
163