Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rag/nlp/synonym.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, redis=None):
self.dictionary = None
path = os.path.join(get_project_base_directory(), "rag/res", "synonym.json")
try:
self.dictionary = json.load(open(path, "r"))
self.dictionary = json.load(open(path, "r", encoding="utf-8"))
except Exception:
logging.warning("Missing synonym.json")
self.dictionary = {}
Expand Down
2 changes: 1 addition & 1 deletion rag/nlp/term_weight.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def load_dict(fnm):
fnm = os.path.join(get_project_base_directory(), "rag/res")
self.ne, self.df = {}, {}
try:
self.ne = json.load(open(os.path.join(fnm, "ner.json"), "r"))
self.ne = json.load(open(os.path.join(fnm, "ner.json"), "r", encoding="utf-8"))
except Exception:
logging.warning("Load ner.json FAIL!")
try:
Expand Down
2 changes: 1 addition & 1 deletion rag/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def citation_prompt():

<USER>: 埃隆·马斯克对 Dogecoin 的看法是什么?

<ASSISTANT>: 马斯克一贯表达了对 Dogecoin 的喜爱,常常提及其幽默感和品牌中狗的元素。他曾表示这是他最喜欢的加密货币 ##0 ##1。
<ASSISTANT>: 马斯克一贯表达了对 Dogecoin 的喜爱,常常提及其幽默感和品牌中狗的元素。他曾表示这是他最喜欢的加密货币 ##0$$ ##1$$
最近,马斯克暗示 Dogecoin 未来可能会有新的应用场景。他的推文引发了关于 Dogecoin 可能被整合到公共服务中的猜测 ##3$$。
总体而言,虽然马斯克喜欢 Dogecoin 并经常推广它,但他也警告不要过度投资,反映了他对其投机性质的既喜爱又谨慎的态度。

Expand Down