Skip to content

Commit b718684

Browse files
authored
Merge pull request #20 from ahuang11/add_system_prompt
Add system prompt to chain
2 parents 03d5db0 + cb229ca commit b718684

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/funcchain/syntax/executable.py

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def chain(
4242

4343
# todo maybe this should be done in the prompt processor?
4444
system = system or settings.system_prompt
45+
if system:
46+
context = [SystemMessage(content=system)] + context
4547
instruction = instruction or from_docstring()
4648

4749
# temp image handling
@@ -90,6 +92,8 @@ async def achain(
9092

9193
# todo maybe this should be done in the prompt processor?
9294
system = system or settings.system_prompt
95+
if system:
96+
context = [SystemMessage(content=system)] + context
9397
instruction = instruction or from_docstring()
9498

9599
# temp image handling

0 commit comments

Comments
 (0)