Spaces:
Running
Running
Commit
·
2d70003
1
Parent(s):
0e49bbd
more changes
Browse files- src/langgraphagenticai/graph/__pycache__/graph_builder.cpython-312.pyc +0 -0
- src/langgraphagenticai/graph/graph_builder.py +1 -1
- src/langgraphagenticai/node/__pycache__/chatbot_with_tools.cpython-312.pyc +0 -0
- src/langgraphagenticai/node/{chatbot_wiyh_tools.py → chatbot_with_tools.py} +0 -0
- src/langgraphagenticai/ui/streamlitui/__pycache__/display_result.cpython-312.pyc +0 -0
- src/langgraphagenticai/ui/streamlitui/display_result.py +12 -8
src/langgraphagenticai/graph/__pycache__/graph_builder.cpython-312.pyc
CHANGED
Binary files a/src/langgraphagenticai/graph/__pycache__/graph_builder.cpython-312.pyc and b/src/langgraphagenticai/graph/__pycache__/graph_builder.cpython-312.pyc differ
|
|
src/langgraphagenticai/graph/graph_builder.py
CHANGED
@@ -3,7 +3,7 @@ from langgraph.prebuilt import tools_condition,ToolNode
|
|
3 |
from langchain_core.prompts import ChatPromptTemplate
|
4 |
from src.langgraphagenticai.state.state import State
|
5 |
from src.langgraphagenticai.node.basic_chatbot_node import BasicChatbotNode
|
6 |
-
from src.langgraphagenticai.node.
|
7 |
from src.langgraphagenticai.tools.searchtool import get_tools,create_tool_node
|
8 |
|
9 |
|
|
|
3 |
from langchain_core.prompts import ChatPromptTemplate
|
4 |
from src.langgraphagenticai.state.state import State
|
5 |
from src.langgraphagenticai.node.basic_chatbot_node import BasicChatbotNode
|
6 |
+
from src.langgraphagenticai.node.chatbot_with_tools import ChatbotWithToolNode
|
7 |
from src.langgraphagenticai.tools.searchtool import get_tools,create_tool_node
|
8 |
|
9 |
|
src/langgraphagenticai/node/__pycache__/chatbot_with_tools.cpython-312.pyc
ADDED
Binary file (1.99 kB). View file
|
|
src/langgraphagenticai/node/{chatbot_wiyh_tools.py → chatbot_with_tools.py}
RENAMED
File without changes
|
src/langgraphagenticai/ui/streamlitui/__pycache__/display_result.cpython-312.pyc
CHANGED
Binary files a/src/langgraphagenticai/ui/streamlitui/__pycache__/display_result.cpython-312.pyc and b/src/langgraphagenticai/ui/streamlitui/__pycache__/display_result.cpython-312.pyc differ
|
|
src/langgraphagenticai/ui/streamlitui/display_result.py
CHANGED
@@ -14,17 +14,21 @@ class DisplayResultStreamlit:
|
|
14 |
graph = self.graph
|
15 |
user_message = self.user_message
|
16 |
if usecase =="Basic Chatbot":
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
elif usecase=="Chatbot with Tool":
|
27 |
# Prepare state and invoke the graph
|
|
|
28 |
initial_state = {"messages": [user_message]}
|
29 |
res = graph.invoke(initial_state)
|
30 |
for message in res['messages']:
|
|
|
14 |
graph = self.graph
|
15 |
user_message = self.user_message
|
16 |
if usecase =="Basic Chatbot":
|
17 |
+
print("I am here in basic chatbot")
|
18 |
+
for event in graph.stream({'messages':("user",user_message)}):
|
19 |
+
|
20 |
+
for value in event.values():
|
21 |
+
print(value['messages'])
|
22 |
+
with st.chat_message("user"):
|
23 |
+
st.write(user_message)
|
24 |
+
|
25 |
+
with st.chat_message("assistant"):
|
26 |
+
st.write(value["messages"].content)
|
27 |
+
|
28 |
|
29 |
elif usecase=="Chatbot with Tool":
|
30 |
# Prepare state and invoke the graph
|
31 |
+
print("I am here ")
|
32 |
initial_state = {"messages": [user_message]}
|
33 |
res = graph.invoke(initial_state)
|
34 |
for message in res['messages']:
|