Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b91b7fa

Browse files
committed
agent prompts
1 parent 219bda7 commit b91b7fa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from llm import llm
22
from graph import graph
3-
from utils import get_session_id
43

54
# Create a movie chat chain
65

solutions/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
# # from solutions.tools.fewshot import cypher_qa
5252
# from solutions.tools.finetuned import cypher_qa
5353

54-
# tag::tools[]
5554
# tools = [
5655
# Tool.from_function(
5756
# name="General Chat",
@@ -72,15 +71,16 @@
7271
# return_direct=True
7372
# )
7473
# ]
75-
# end::tools[]
7674

7775
# tag::get_memory[]
7876
def get_memory(session_id):
7977
return Neo4jChatMessageHistory(session_id=session_id, graph=graph)
8078
# end::get_memory[]
8179

8280
# tag::agent[]
81+
# tag::agent_prompt[]
8382
agent_prompt = hub.pull("hwchase17/react-chat")
83+
# end::agent_prompt[]
8484
agent = create_react_agent(llm, tools, agent_prompt)
8585
agent_executor = AgentExecutor(
8686
agent=agent,

0 commit comments

Comments
 (0)