Krishnaik06 commited on
Commit
bf2967f
·
1 Parent(s): 87aa8cf

complete project modular

Browse files
src/langgraphagenticai/LLMS/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (156 Bytes). View file
 
src/langgraphagenticai/LLMS/__pycache__/groqllm.cpython-312.pyc ADDED
Binary file (1.32 kB). View file
 
src/langgraphagenticai/LLMS/groqllm.py CHANGED
@@ -9,7 +9,7 @@ class GroqLLM:
9
  def get_llm_model(self):
10
  try:
11
  groq_api_key=self.user_controls_input['GROQ_API_KEY']
12
- selected_groq_model=self.user_controls_input['selected_groq_models']
13
  if groq_api_key=='' and os.environ["GROQ_API_KEY"] =='':
14
  st.error("Please Enter the Groq API KEY")
15
 
 
9
  def get_llm_model(self):
10
  try:
11
  groq_api_key=self.user_controls_input['GROQ_API_KEY']
12
+ selected_groq_model=self.user_controls_input['selected_groq_model']
13
  if groq_api_key=='' and os.environ["GROQ_API_KEY"] =='':
14
  st.error("Please Enter the Groq API KEY")
15
 
src/langgraphagenticai/__pycache__/main.cpython-312.pyc CHANGED
Binary files a/src/langgraphagenticai/__pycache__/main.cpython-312.pyc and b/src/langgraphagenticai/__pycache__/main.cpython-312.pyc differ
 
src/langgraphagenticai/graph/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (157 Bytes). View file
 
src/langgraphagenticai/graph/__pycache__/graph_builder.cpython-312.pyc ADDED
Binary file (2.25 kB). View file
 
src/langgraphagenticai/main.py CHANGED
@@ -3,6 +3,7 @@ import json
3
  from src.langgraphagenticai.ui.streamlitui.loadui import LoadStreamlitUI
4
  from src.langgraphagenticai.LLMS.groqllm import GroqLLM
5
  from src.langgraphagenticai.graph.graph_builder import GraphBuilder
 
6
 
7
  # MAIN Function START
8
  def load_langgraph_agenticai_app():
@@ -48,9 +49,11 @@ def load_langgraph_agenticai_app():
48
  graph_builder=GraphBuilder(model)
49
  try:
50
  graph = graph_builder.setup_graph(usecase)
 
51
  except Exception as e:
52
  st.error(f"Error: Graph setup failed - {e}")
53
  return
 
54
 
55
  except Exception as e:
56
  raise ValueError(f"Error Occurred with Exception : {e}")
 
3
  from src.langgraphagenticai.ui.streamlitui.loadui import LoadStreamlitUI
4
  from src.langgraphagenticai.LLMS.groqllm import GroqLLM
5
  from src.langgraphagenticai.graph.graph_builder import GraphBuilder
6
+ from src.langgraphagenticai.ui.streamlitui.display_result import DisplayResultStreamlit
7
 
8
  # MAIN Function START
9
  def load_langgraph_agenticai_app():
 
49
  graph_builder=GraphBuilder(model)
50
  try:
51
  graph = graph_builder.setup_graph(usecase)
52
+ DisplayResultStreamlit(usecase,graph,user_message).display_result_on_ui()
53
  except Exception as e:
54
  st.error(f"Error: Graph setup failed - {e}")
55
  return
56
+
57
 
58
  except Exception as e:
59
  raise ValueError(f"Error Occurred with Exception : {e}")
src/langgraphagenticai/nodes/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (157 Bytes). View file
 
src/langgraphagenticai/nodes/__pycache__/basic_chatbot_node.cpython-312.pyc ADDED
Binary file (1 kB). View file
 
src/langgraphagenticai/state/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (157 Bytes). View file
 
src/langgraphagenticai/state/__pycache__/state.cpython-312.pyc ADDED
Binary file (820 Bytes). View file
 
src/langgraphagenticai/ui/streamlitui/__pycache__/display_result.cpython-312.pyc ADDED
Binary file (1.82 kB). View file
 
src/langgraphagenticai/ui/streamlitui/__pycache__/loadui.cpython-312.pyc CHANGED
Binary files a/src/langgraphagenticai/ui/streamlitui/__pycache__/loadui.cpython-312.pyc and b/src/langgraphagenticai/ui/streamlitui/__pycache__/loadui.cpython-312.pyc differ
 
src/langgraphagenticai/ui/streamlitui/display_result.py CHANGED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from langchain_core.messages import HumanMessage,AIMessage
3
+ import json
4
+
5
+
6
+ class DisplayResultStreamlit:
7
+ def __init__(self,usecase,graph,user_message):
8
+ self.usecase= usecase
9
+ self.graph = graph
10
+ self.user_message = user_message
11
+
12
+ def display_result_on_ui(self):
13
+ usecase= self.usecase
14
+ graph = self.graph
15
+ user_message = self.user_message
16
+ if usecase =="Basic Chatbot":
17
+ for event in graph.stream({'messages':("user",user_message)}):
18
+ print(event.values())
19
+ for value in event.values():
20
+ print(value['messages'])
21
+ with st.chat_message("user"):
22
+ st.write(user_message)
23
+ with st.chat_message("assistant"):
24
+ st.write(value["messages"].content)