KaiserShultz/Ankelodon_AI_Multi_task_agentic_system
1
1from langchain_openai import ChatOpenAI2from src.tools.tools import *3from src.tools.code_interpreter import safe_code_run4from langgraph.prebuilt import ToolNode5from src.schemas import PlannerPlan6from src.tools.youtube_transcript import extract_youtube_transcript7from src.tools.video_analyzer import video_qa_gemma8from src.utils.utils import log_stage9from langchain_core.messages import HumanMessage, SystemMessage, AIMessage, ToolMessage10from dotenv import load_dotenv11load_dotenv()12 13config = {"configurable": {"thread_id": "1"}, "recursion_limit" : 50}14 15TOOLS = [video_qa_gemma, download_file_from_url, web_search, 16 arxiv_search, wiki_search, add, subtract, multiply, divide, 17 power, analyze_excel_file, analyze_csv_file, analyze_docx_file, 18 analyze_pdf_file, analyze_txt_file, 19 vision_qa_gemma, safe_code_run, web_extract, transcribe_audio] #extract_youtube_transcript20 21 22TOOL_NODE = ToolNode(TOOLS)23DEBUGGING_TOOL_NODE = TOOL_NODE24 25llm = ChatOpenAI(model="gpt-4o-mini", temperature=0.7) #default 0.2526llm_deterministic = ChatOpenAI(model="gpt-5-mini", temperature=0.05)27planner_llm = ChatOpenAI(model="gpt-4o-mini", temperature=0.1).with_structured_output(PlannerPlan)28llm_criticist = ChatOpenAI(model="gpt-4o-mini", temperature=0.1)29llm_with_tools = llm_deterministic.bind_tools(TOOLS)30llm_reasoning = ChatOpenAI(model="gpt-5-mini", temperature=0.3)31llm_simple_executor = ChatOpenAI(model="gpt-5-mini", temperature=0.3)32llm_simple_with_tools = llm_simple_executor.bind_tools(TOOLS)33 34 35 36 37 