Skip to content

Commit

Permalink
Merge pull request #20 from ahuang11/add_system_prompt
Browse files Browse the repository at this point in the history
Add system prompt to chain
  • Loading branch information
shroominic authored Feb 11, 2024
2 parents 03d5db0 + cb229ca commit b718684
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/funcchain/syntax/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b718684

Please sign in to comment.