feat: system prompt (#448)

This commit is contained in:
cachho
2023-08-16 21:57:01 +02:00
committed by GitHub
parent 7585bc557b
commit 849de5e8ab
9 changed files with 50 additions and 10 deletions

View File

@@ -25,6 +25,8 @@ class App(EmbedChain):
def get_llm_model_answer(self, prompt, config: ChatConfig):
messages = []
if config.system_prompt:
messages.append({"role": "system", "content": config.system_prompt})
messages.append({"role": "user", "content": prompt})
response = openai.ChatCompletion.create(
model=config.model or "gpt-3.5-turbo-0613",