Fix/bug en zh (#382)
* [fix]The log retains genuine alerts and errors, while filtering out unnecessary noise. * [fix]Scenario English and Chinese, emotion specifications * [fix]Change the "no data" scenario from 0.0 to None
This commit is contained in:
@@ -233,6 +233,14 @@ async def extract_ontology(
|
||||
language=language
|
||||
)
|
||||
|
||||
# 根据语言类型统一 name 字段
|
||||
# zh: name 使用 name_chinese(中文名)
|
||||
# en: name 保持原值(英文 PascalCase)
|
||||
if language == "zh":
|
||||
for cls in result.classes:
|
||||
if cls.name_chinese:
|
||||
cls.name = cls.name_chinese
|
||||
|
||||
# 构建响应
|
||||
response = ExtractionResponse(
|
||||
classes=result.classes,
|
||||
|
||||
Reference in New Issue
Block a user