fix: system prompt err when using o1 models

This commit is contained in:
binary-husky
2024-09-14 17:04:01 +00:00
parent 18290fd138
commit 597c320808
2 changed files with 2 additions and 2 deletions

View File

@@ -447,7 +447,7 @@ def generate_payload(inputs:str, llm_kwargs:dict, history:list, system_prompt:st
openai_disable_system_prompt = model_info[llm_kwargs['llm_model']].get('openai_disable_system_prompt', False)
if openai_disable_system_prompt:
messages = []
messages = [{"role": "user", "content": system_prompt}]
else:
messages = [{"role": "system", "content": system_prompt}]