Spaces:
Sleeping
Sleeping
Commit
·
80e63e4
1
Parent(s):
5d1246e
UI code and folder structure
Browse files- app.py +0 -0
- src/__init__.py +0 -0
- src/langgraph_agenticAI/Graphs/__init__.py +0 -0
- src/langgraph_agenticAI/LLMs/__init__.py +0 -0
- src/langgraph_agenticAI/LLMs/groq_llm.py +0 -0
- src/langgraph_agenticAI/Nodes/__init__.py +0 -0
- src/langgraph_agenticAI/States/__init__.py +0 -0
- src/langgraph_agenticAI/Tools/__init__.py +0 -0
- src/langgraph_agenticAI/UI/__init__.py +0 -0
- src/langgraph_agenticAI/UI/streamlitui/display_result.py +0 -0
- src/langgraph_agenticAI/UI/streamlitui/load_ui.py +12 -0
- src/langgraph_agenticAI/UI/uiconfigfile.ini +5 -0
- src/langgraph_agenticAI/UI/uiconfigfile.py +18 -0
- src/langgraph_agenticAI/VectorStore/__init__.py +0 -0
- src/langgraph_agenticAI/__init__.py +0 -0
- src/langgraph_agenticAI/main.py +0 -0
app.py
ADDED
|
File without changes
|
src/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/Graphs/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/LLMs/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/LLMs/groq_llm.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/Nodes/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/States/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/Tools/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/UI/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/UI/streamlitui/display_result.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/UI/streamlitui/load_ui.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import os
|
| 3 |
+
from datetime import date
|
| 4 |
+
|
| 5 |
+
from langchain_core import AIMessage, HumanMessage #because msg we are going to mention in UI is either AImsg or Humanmsg
|
| 6 |
+
from src.langgraph_agenticAI.UI.uiconfigfile import Config #Config is class
|
| 7 |
+
class LoadStreamLitUI:
|
| 8 |
+
def __init__(self):
|
| 9 |
+
self.config=Config() #for this cofig we created ini file i.e, uiconfig.ini (text file to store configs in form of key-value pairs) like yaml config.
|
| 10 |
+
self.user_controls={}
|
| 11 |
+
|
| 12 |
+
|
src/langgraph_agenticAI/UI/uiconfigfile.ini
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[DEFAULT]
|
| 2 |
+
PAGE_TITLE= Langgraph: Build Stateful Agentic AI graph
|
| 3 |
+
LLM_OPTIONS= Groq
|
| 4 |
+
USECASE_OPTIONS= Basic Chatbot, Chatbot With Tool, Travel Partner, SDLC Workflow, AI News
|
| 5 |
+
GROQ_MODEL_OPTIONS= mixtral-8x7b-32768, llama3-8b-8192, llama-70b-8192, gemma-7b-i
|
src/langgraph_agenticAI/UI/uiconfigfile.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from configparser import ConfigParser #class to parse cofig text file
|
| 2 |
+
|
| 3 |
+
class Config: #inside any class, we start with constructor
|
| 4 |
+
def __init__(self,config_file="C:\Users\blues\OneDrive\Documents\E2E_Langraph_Project\src\langgraph_agenticAI\UI\uiconfigfile.ini"):
|
| 5 |
+
self.config=ConfigParser() #initialize the constructor, config is public variable , use this configParser object will read the config file and store in config variable
|
| 6 |
+
self.config.read(config_file)
|
| 7 |
+
|
| 8 |
+
def get_llm_option(self): #to only read llm field from config file
|
| 9 |
+
return self.config["DEFAULT"].get("LLM_OPTIONS").split(", ") #DEFAULT is root note for all the below node hving access of everything written below
|
| 10 |
+
|
| 11 |
+
def get_usecase_options(self):
|
| 12 |
+
return self.config["DEFAULT"].get("USECASE_OPTIONS").split(", ")
|
| 13 |
+
|
| 14 |
+
def get_groq_model_options(self):
|
| 15 |
+
return self.config["DEFAULT"].get("GROQ_MODEL_OPTIONS").split(", ")
|
| 16 |
+
|
| 17 |
+
def get_page_title(self):
|
| 18 |
+
return self.config["DEFAULT"].get("PAGE_TITLE")
|
src/langgraph_agenticAI/VectorStore/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/__init__.py
ADDED
|
File without changes
|
src/langgraph_agenticAI/main.py
ADDED
|
File without changes
|