Update rag_langgraph.py
Browse files- rag_langgraph.py +5 -2
rag_langgraph.py
CHANGED
@@ -26,7 +26,10 @@ class AgentState(TypedDict):
|
|
26 |
def create_agent(llm: ChatOpenAI, tools: list, system_prompt: str):
|
27 |
prompt = ChatPromptTemplate.from_messages(
|
28 |
[
|
29 |
-
(
|
|
|
|
|
|
|
30 |
MessagesPlaceholder(variable_name="messages"),
|
31 |
MessagesPlaceholder(variable_name="agent_scratchpad"),
|
32 |
]
|
@@ -42,7 +45,7 @@ def agent_node(state, agent, name):
|
|
42 |
def create_graph(topic, word_count):
|
43 |
tavily_tool = TavilySearchResults(max_results=10)
|
44 |
|
45 |
-
members = ["Blogger"]
|
46 |
|
47 |
system_prompt = (
|
48 |
"You are a manager tasked with managing a conversation between the"
|
|
|
26 |
def create_agent(llm: ChatOpenAI, tools: list, system_prompt: str):
|
27 |
prompt = ChatPromptTemplate.from_messages(
|
28 |
[
|
29 |
+
(
|
30 |
+
"system",
|
31 |
+
system_prompt
|
32 |
+
),
|
33 |
MessagesPlaceholder(variable_name="messages"),
|
34 |
MessagesPlaceholder(variable_name="agent_scratchpad"),
|
35 |
]
|
|
|
45 |
def create_graph(topic, word_count):
|
46 |
tavily_tool = TavilySearchResults(max_results=10)
|
47 |
|
48 |
+
members = ["Researcher", "Blogger"]
|
49 |
|
50 |
system_prompt = (
|
51 |
"You are a manager tasked with managing a conversation between the"
|