chore: save local changes
This commit is contained in:
51
backend/app/prompts/language_config.py
Normal file
51
backend/app/prompts/language_config.py
Normal file
@@ -0,0 +1,51 @@
|
||||
"""Language configuration for prompts"""
|
||||
|
||||
from enum import Enum
|
||||
from typing import Literal
|
||||
|
||||
class Language(str, Enum):
|
||||
CHINESE = "zh"
|
||||
ENGLISH = "en"
|
||||
|
||||
LanguageType = Literal["zh", "en"]
|
||||
|
||||
# Default categories for each language
|
||||
DEFAULT_CATEGORIES = {
|
||||
"zh": ["材料", "功能", "用途", "使用族群", "特性"],
|
||||
"en": ["Materials", "Functions", "Usages", "User Groups", "Characteristics"],
|
||||
}
|
||||
|
||||
CATEGORY_DESCRIPTIONS = {
|
||||
"zh": {
|
||||
"材料": "物件由什麼材料組成",
|
||||
"功能": "物件能做什麼",
|
||||
"用途": "物件在什麼場景使用",
|
||||
"使用族群": "誰會使用這個物件",
|
||||
"特性": "物件有什麼特徵",
|
||||
},
|
||||
"en": {
|
||||
"Materials": "What materials the object is made of",
|
||||
"Functions": "What the object can do",
|
||||
"Usages": "In what scenarios the object is used",
|
||||
"User Groups": "Who uses this object",
|
||||
"Characteristics": "What features the object has",
|
||||
},
|
||||
}
|
||||
|
||||
# Category name mappings between languages
|
||||
CATEGORY_MAPPING = {
|
||||
"zh_to_en": {
|
||||
"材料": "Materials",
|
||||
"功能": "Functions",
|
||||
"用途": "Usages",
|
||||
"使用族群": "User Groups",
|
||||
"特性": "Characteristics",
|
||||
},
|
||||
"en_to_zh": {
|
||||
"Materials": "材料",
|
||||
"Functions": "功能",
|
||||
"Usages": "用途",
|
||||
"User Groups": "使用族群",
|
||||
"Characteristics": "特性",
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user