术语表提示无视大小写

This commit is contained in:
xunbu
2025-10-16 23:32:39 +08:00
parent c9c9bf920a
commit 2920c11275

View File

@@ -19,7 +19,7 @@ class Glossary:
flag = False
prompt = "\nHere is the reference glossary:\n"
for src, dst in self.glossary_dict.items():
if src in text:
if src.lower().strip() in text.lower():
prompt += f"{src}=>{dst}\n"
flag = True
prompt += "Glossary ends\n"