Skip to content

Commit a70be89

Browse files
authored
Merge pull request #327 from traceroot-ai/feat/allow_response_in_languages
feat: allow response in different languages
2 parents 489e7ac + c84616d commit a70be89

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

rest/agent/prompts/agent_prompts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@
4141
of reference objects with fields: number, span_id, span_function_name,
4242
line_number, log_message). Make sure if possible to include reference
4343
numbers like [1], [2] in your answer text where appropriate.
44+
13. IMPORTANT: Your response language should match the user's query language.
45+
If the user asks in Chinese, respond in Chinese. If in English, respond in English.
46+
Adapt to whatever language the user uses.
4447
"""

rest/agent/prompts/chat_prompts.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@
2929
of reference objects with fields: number, span_id, span_function_name,
3030
line_number, log_message). Make sure if possible to include reference
3131
numbers like [1], [2] in your answer text where appropriate.
32+
9. IMPORTANT: Your response language should try to match the user's query language.
33+
If the user asks in Chinese, respond in Chinese. If in English, respond in English.
34+
Adapt to whatever language the user uses.
3235
"""
3336

3437
LOCAL_MODE_APPENDIX = """
35-
9. If user wants to create a GitHub PR or issue, say that
38+
10. If user wants to create a GitHub PR or issue, say that
3639
you cannot do that and suggest them to use
3740
https://traceroot.ai production service instead.
3841
"""

0 commit comments

Comments
 (0)