Skip to content

Commit 0a64f60

Browse files
committed
define environment parameter for system prompt
1 parent d001147 commit 0a64f60

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.env.template

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,10 @@ SUMMARIZER_TYPE="mock" # Options: "mock", "llm"
101101
## Notifier Settings
102102
NOTIFIER_TYPE="mock" # Options: "mock", "slack"
103103
NOTIFIER_SLACK_WEBHOOK_URL="https://hooks.slack.com/services/xxx"
104+
105+
# ---------
106+
# Agents
107+
# ---------
108+
109+
## Chat with Tools Agent Settings
110+
CHAT_WITH_TOOLS_AGENT_SYSTEM_PROMPT="You are a helpful assistant. Use appropriate tools to answer user questions."

template_langgraph/services/streamlits/pages/chat_with_tools_agent.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import streamlit as st
1010
from audio_recorder_streamlit import audio_recorder
11+
from dotenv import load_dotenv
1112
from langchain_community.callbacks.streamlit import (
1213
StreamlitCallbackHandler,
1314
)
@@ -28,6 +29,10 @@
2829

2930
logger = get_logger(__name__)
3031
logger.setLevel("DEBUG")
32+
load_dotenv(
33+
override=True,
34+
verbose=True,
35+
)
3136

3237

3338
class CheckpointType(str, Enum):
@@ -134,6 +139,7 @@ def ensure_agent_graph(selected_tools: list) -> None:
134139
store=SqliteStore(
135140
conn=store_conn,
136141
),
142+
system_prompt=os.getenv("CHAT_WITH_TOOLS_AGENT_SYSTEM_PROMPT", None),
137143
).create_graph()
138144
st.session_state["graph_tools_signature"] = signature
139145

0 commit comments

Comments
 (0)