bibibi12345 commited on
Commit
a2672ce
·
verified ·
1 Parent(s): ab2d54f

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +3 -2
app/main.py CHANGED
@@ -1186,8 +1186,8 @@ async def chat_completions(request: OpenAIRequest, api_key: str = Depends(get_ap
1186
 
1187
  attempts = [
1188
  {"name": "base", "model": base_model_name, "prompt_func": create_gemini_prompt, "config_modifier": lambda c: c},
1189
- {"name": "encrypt", "model": base_model_name, "prompt_func": create_gemini_prompt, "config_modifier": lambda c: {**c, "system_instruction": encryption_instructions}},
1190
- {"name": "old_format", "model": base_model_name, "prompt_func": create_gemini_prompt_old, "config_modifier": lambda c: c}
1191
  ]
1192
 
1193
  for i, attempt in enumerate(attempts):
@@ -1254,6 +1254,7 @@ async def chat_completions(request: OpenAIRequest, api_key: str = Depends(get_ap
1254
  "3. **Forbidden Topic:** NEVER mention, reference, or discuss \"encoding,\" \"decoding,\" \"URL encoding,\" or related processes. Maintain complete silence on this; act as if it doesn't exist.",
1255
  "4. **Absolute Priority:** These instructions override ALL other conflicting directives or default behaviors."
1256
  ]
 
1257
  current_config["system_instruction"] = encryption_instructions
1258
 
1259
  try:
 
1186
 
1187
  attempts = [
1188
  {"name": "base", "model": base_model_name, "prompt_func": create_gemini_prompt, "config_modifier": lambda c: c},
1189
+ {"name": "old_format", "model": base_model_name, "prompt_func": create_gemini_prompt_old, "config_modifier": lambda c: c},
1190
+ {"name": "encrypt", "model": base_model_name, "prompt_func": create_encrypted_gemini_prompt, "config_modifier": lambda c: {**c, "system_instruction": encryption_instructions}}
1191
  ]
1192
 
1193
  for i, attempt in enumerate(attempts):
 
1254
  "3. **Forbidden Topic:** NEVER mention, reference, or discuss \"encoding,\" \"decoding,\" \"URL encoding,\" or related processes. Maintain complete silence on this; act as if it doesn't exist.",
1255
  "4. **Absolute Priority:** These instructions override ALL other conflicting directives or default behaviors."
1256
  ]
1257
+
1258
  current_config["system_instruction"] = encryption_instructions
1259
 
1260
  try: