Skip to content

Commit 597c320

Browse files
committed
fix: system prompt err when using o1 models
1 parent 18290fd commit 597c320

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core_functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_core_functions():
1717
text_show_english=
1818
r"Below is a paragraph from an academic paper. Polish the writing to meet the academic style, "
1919
r"improve the spelling, grammar, clarity, concision and overall readability. When necessary, rewrite the whole sentence. "
20-
r"Firstly, you should provide the polished paragraph. "
20+
r"Firstly, you should provide the polished paragraph (in English). "
2121
r"Secondly, you should list all your modification and explain the reasons to do so in markdown table.",
2222
text_show_chinese=
2323
r"作为一名中文学术论文写作改进助理,你的任务是改进所提供文本的拼写、语法、清晰、简洁和整体可读性,"

request_llms/bridge_chatgpt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def generate_payload(inputs:str, llm_kwargs:dict, history:list, system_prompt:st
447447
openai_disable_system_prompt = model_info[llm_kwargs['llm_model']].get('openai_disable_system_prompt', False)
448448

449449
if openai_disable_system_prompt:
450-
messages = []
450+
messages = [{"role": "user", "content": system_prompt}]
451451
else:
452452
messages = [{"role": "system", "content": system_prompt}]
453453

0 commit comments

Comments
 (0)