First working implementation of the program

This commit is contained in:
2026-07-27 17:42:48 +09:00
parent 9f9c72e824
commit e5bb49a596
12 changed files with 618 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
from datetime import datetime
import logging
from pathlib import Path
from dataclasses import dataclass, field
from typing import List
from utilities.logger import simple_logger
###########################################################################################
verbose = True #Set to True to see CrewAI process information in the console
###########################################################################################
###########################################################################################
printLogToConsole = False #Set to True to save and print log information to console, else set to False to only save log information to file
###########################################################################################
###########################################################################################
#Define logger parameter
###########################################################################################
logger = logging.getLogger()
def create_logger():
log_fiename_prefix = "log"
script_dir = Path(__file__).parent
target_dir = script_dir / "log"
target_dir.mkdir(parents=True, exist_ok=True)
now = datetime.now()
formatted_DateTime = now.strftime("%Y-%m-%d_%H%M%S")
log_path = f"""log/{log_fiename_prefix}_{formatted_DateTime}.log"""
global logger
logger = simple_logger(log_path, printLogToConsole)
###########################################################################################
#Create a 'dataclass' for all configs that can be used anywhere in this Project
###########################################################################################
@dataclass
class AgenticAIConfig:
# UI Selections from users
provider:str = "OpenAI"
model: str = "gpt-4o"
temperature: float = 0.4
max_tokens:int = 3000
# User Input
user_query:str=""
# Agent Settings (CrewAI Specifics)
#agent_name:str = "default"
#tools: List[str] = field(default_factory=list)
# Runtime
response:str=""
chat_history:List[dict] = field(default_factory=list)