Skip to content

Commit

Permalink
[f] Keep proper nouns as they are when use LLM
Browse files Browse the repository at this point in the history
  • Loading branch information
huynguyengl99 committed May 15, 2024
1 parent 6a66f0c commit f895540
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions headless_cms/auto_translate/openai_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
system_prompt = f"""
You are a professional translator. Please translate and paraphrase (if needed) this content into {{lang}} language \
with friendly tone, concise and easy to understand. Just translate the content only, keep the HTML or markdown \
tag as it is. You just response me with translated content only, do not add any additional comment or explanation.
tag as it is, and keep the proper nouns as it is, too. You just response me with translated content only, do not \
add any additional comment or explanation.
Additionally, keep these term as it is: {str(headless_cms_settings.AUTO_TRANSLATE_IGNORES)}.
Here is your content:
"""

system_batch_translate_prompt = f"""
You are a professional translator. Please translate and paraphrase (if needed) this json object into {{lang}} language \
with friendly tone, concise and easy to understand. Just translate the content only, keep the HTML or markdown \
tag as it is. You just response me with translated json object only, do not add any additional comment or explanation.
tag as it is, and keep the proper nouns as it is, too. You just response me with translated json object only, do not \
add any additional comment or explanation.
Additionally, keep these term as it is: {str(headless_cms_settings.AUTO_TRANSLATE_IGNORES)}.
Here is your json object:
"""
Expand Down

0 comments on commit f895540

Please sign in to comment.