From cb229ca3a21a32a6186209067a09761bd41a151c Mon Sep 17 00:00:00 2001 From: Andrew Huang Date: Fri, 9 Feb 2024 11:47:04 -0800 Subject: [PATCH] Add system prompt to chain --- src/funcchain/syntax/executable.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/funcchain/syntax/executable.py b/src/funcchain/syntax/executable.py index 4bab684..b95dbf3 100644 --- a/src/funcchain/syntax/executable.py +++ b/src/funcchain/syntax/executable.py @@ -42,6 +42,8 @@ def chain( # todo maybe this should be done in the prompt processor? system = system or settings.system_prompt + if system: + context = [SystemMessage(content=system)] + context instruction = instruction or from_docstring() # temp image handling @@ -90,6 +92,8 @@ async def achain( # todo maybe this should be done in the prompt processor? system = system or settings.system_prompt + if system: + context = [SystemMessage(content=system)] + context instruction = instruction or from_docstring() # temp image handling