Spaces:
Sleeping
Sleeping
File size: 985 Bytes
80e63e4 a407200 80e63e4 a407200 80e63e4 a407200 80e63e4 a407200 80e63e4 a407200 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from configparser import ConfigParser #class to parse cofig text file
class Config: #inside any class, we start with constructor
def __init__(self,config_file="./src/langgraph_agenticAI/UI/uiconfigfile.ini"):
self.config=ConfigParser() #initialize the constructor, config is public variable , use this configParser object will read the config file and store in config variable
self.config.read(config_file)
def get_llm_options(self): #to only read llm field from config file
return self.config["DEFAULT"].get("LLM_OPTIONS").split(", ") #DEFAULT is root note for all the below node hving access of everything written below
def get_usecase_options(self):
return self.config["DEFAULT"].get("USECASE_OPTIONS").split(", ")
def get_groq_model_options(self):
return self.config["DEFAULT"].get("GROQ_MODEL_OPTIONS").split(", ")
def get_page_title(self):
return self.config["DEFAULT"].get("PAGE_TITLE") |