1. Step 5: Use empty model_config_dict={} so camel-ai doesn't spread
api_key into create() - AsyncOpenAI reads env vars automatically.
Step 3 unaffected (same env vars, just cleaner ModelFactory call).
2. Step 2: Fix Thai text truncation - isalnum() stripped Thai chars.
Use re.sub(r'[^\w]', '', username, re.UNICODE) instead.
3. Step 4: Move get_language_instruction() to START of prompt (not end)
and strengthen wording with MUST/IMPORTANT prefix.
34 lines
1.2 KiB
JSON
34 lines
1.2 KiB
JSON
{
|
|
"zh": {
|
|
"label": "中文",
|
|
"llmInstruction": "重要:你必须使用中文撰写所有内容。请使用中文回答。"
|
|
},
|
|
"en": {
|
|
"label": "English",
|
|
"llmInstruction": "IMPORTANT: You MUST write ALL content exclusively in English. Do NOT use any other language in your response."
|
|
},
|
|
"es": {
|
|
"label": "Español",
|
|
"llmInstruction": "Por favor, responde en español."
|
|
},
|
|
"fr": {
|
|
"label": "Français",
|
|
"llmInstruction": "Veuillez répondre en français."
|
|
},
|
|
"pt": {
|
|
"label": "Português",
|
|
"llmInstruction": "Por favor, responda em português."
|
|
},
|
|
"ru": {
|
|
"label": "Русский",
|
|
"llmInstruction": "Пожалуйста, отвечайте на русском языке."
|
|
},
|
|
"de": {
|
|
"label": "Deutsch",
|
|
"llmInstruction": "Bitte antworten Sie auf Deutsch."
|
|
},
|
|
"th": {
|
|
"label": "ไทย",
|
|
"llmInstruction": "IMPORTANT: You MUST write ALL content exclusively in Thai language (ภาษาไทย). Do NOT use any other language in your response. กรุณาตอบเป็นภาษาไทยเท่านั้น ห้ามใช้ภาษาอื่น"
|
|
}
|
|
} |