File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
from llm import llm
2
2
from graph import graph
3
- from utils import get_session_id
4
3
5
4
# Create a movie chat chain
6
5
Original file line number Diff line number Diff line change 51
51
# # from solutions.tools.fewshot import cypher_qa
52
52
# from solutions.tools.finetuned import cypher_qa
53
53
54
- # tag::tools[]
55
54
# tools = [
56
55
# Tool.from_function(
57
56
# name="General Chat",
72
71
# return_direct=True
73
72
# )
74
73
# ]
75
- # end::tools[]
76
74
77
75
# tag::get_memory[]
78
76
def get_memory (session_id ):
79
77
return Neo4jChatMessageHistory (session_id = session_id , graph = graph )
80
78
# end::get_memory[]
81
79
82
80
# tag::agent[]
81
+ # tag::agent_prompt[]
83
82
agent_prompt = hub .pull ("hwchase17/react-chat" )
83
+ # end::agent_prompt[]
84
84
agent = create_react_agent (llm , tools , agent_prompt )
85
85
agent_executor = AgentExecutor (
86
86
agent = agent ,
You can’t perform that action at this time.
0 commit comments