Skip to content

Commit 633cd38

Browse files
committed
Added OPEY_SYSTEM_PROMPT
1 parent 7851e35 commit 633cd38

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ ANONYMOUS_SESSION_TOKEN_LIMIT=10000
159159
# Maximum number of requests an anonymous session can make before requiring authentication
160160
ANONYMOUS_SESSION_REQUEST_LIMIT=20
161161

162+
# Custom system prompt for Opey (optional)
163+
# If not set, uses the default prompt defined in src/agent/components/chains.py
164+
# OPEY_SYSTEM_PROMPT="Your custom system prompt here..."
165+
162166
# Model Config
163167
## you will need the appropriate API key for the model provider you choose
164168
## i.e. OPENAI_API_KEY or ANTHROPIC_API_KEY

src/agent/graph_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(self):
6060
def reset(self):
6161
"""Reset builder to default state"""
6262
self._tools: List[BaseTool] = []
63-
self._system_prompt: str = opey_system_prompt_template
63+
self._system_prompt: str = os.getenv("OPEY_SYSTEM_PROMPT", opey_system_prompt_template)
6464
self._model_name: str = "medium"
6565
self._temperature: float = 0.7
6666
self._checkpointer: Optional[BaseCheckpointSaver] = None

0 commit comments

Comments
 (0)