Skip to content

Commit 0c70dc0

Browse files
committed
organized system prompt to a different file
1 parent 22d0297 commit 0c70dc0

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

api/llm/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
from langgraph.checkpoint.postgres import PostgresSaver
99
from langgraph.prebuilt import create_react_agent
1010

11+
from llm.prompt import system_message
12+
1113
load_dotenv()
1214

1315
# Global agent instance
@@ -39,9 +41,7 @@ def get_agent():
3941
_agent_executor = create_react_agent(
4042
llm,
4143
tools=[],
42-
prompt="You are a helpful AI image editing assistant. \
43-
You help users with image editing tasks and provide guidance \
44-
on how to modify their images.",
44+
prompt=system_message,
4545
checkpointer=get_checkpointer(),
4646
)
4747

api/llm/prompt.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Prompt templates used by Agent."""
2+
3+
system_message = """
4+
You are a helpful AI image editing assistant. You help users with image editing
5+
tasks and provide guidance on how to modify their images.
6+
7+
"""

0 commit comments

Comments
 (0)