File size: 1,378 Bytes
715a633
ebafaef
 
715a633
ebafaef
 
6c44e19
331400f
 
715a633
 
 
 
 
 
758564e
af3a044
715a633
 
 
758564e
 
 
 
 
af3a044
758564e
 
af3a044
 
715a633
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from langchain_openai import ChatOpenAI
from src.tools.tools import *
from src.tools.code_interpreter import safe_code_run
from langgraph.prebuilt import ToolNode
from src.schemas import PlannerPlan
from src.utils.utils import log_stage
from langchain_core.messages import HumanMessage, SystemMessage, AIMessage, ToolMessage
from dotenv import load_dotenv
load_dotenv()

config = {"configurable": {"thread_id": "1"}, "recursion_limit" : 50}

TOOLS = [download_file_from_url, web_search, 
         arxiv_search, wiki_search, add, subtract, multiply, divide, 
         power, analyze_excel_file, analyze_csv_file, analyze_docx_file, 
         analyze_pdf_file, analyze_txt_file, 
         vision_qa_gemma, safe_code_run, web_extract, extract_youtube_transcript]


TOOL_NODE = ToolNode(TOOLS)
DEBUGGING_TOOL_NODE = TOOL_NODE

llm = ChatOpenAI(model="gpt-4o-mini", temperature=0.7) #default 0.25
llm_deterministic = ChatOpenAI(model="gpt-5-mini", temperature=0.05)
planner_llm = ChatOpenAI(model="gpt-4o-mini", temperature=0.1).with_structured_output(PlannerPlan)
llm_criticist = ChatOpenAI(model="gpt-4o-mini", temperature=0.1)
llm_with_tools = llm_deterministic.bind_tools(TOOLS)
llm_reasoning = ChatOpenAI(model="gpt-5-mini", temperature=0.3)
llm_simple_executor = ChatOpenAI(model="gpt-5-mini", temperature=0.3)
llm_simple_with_tools = llm_simple_executor.bind_tools(TOOLS)