Update agents/build_graph.py
Browse files- agents/build_graph.py +2 -1
agents/build_graph.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
from langgraph.graph import StateGraph, END
|
| 2 |
from agents.agent_builder import make_news_agent, make_earnings_agent, make_market_agent, make_synthesizer
|
| 3 |
from agents.graph_state import GraphState
|
|
@@ -8,7 +9,7 @@ from agents.supervisor_router import AGENTS, supervisor_router
|
|
| 8 |
def build_graph(llm_model_name: str = "gpt-4o-mini"):
|
| 9 |
|
| 10 |
# --- Base LLM for agents & synthesizer (swap to your provider as needed) ---
|
| 11 |
-
openai_api_key="
|
| 12 |
llm = ChatOpenAI(api_key=openai_api_key,model=llm_model_name, temperature=0)
|
| 13 |
|
| 14 |
# --- Create specialized agents ---
|
|
|
|
| 1 |
+
import os
|
| 2 |
from langgraph.graph import StateGraph, END
|
| 3 |
from agents.agent_builder import make_news_agent, make_earnings_agent, make_market_agent, make_synthesizer
|
| 4 |
from agents.graph_state import GraphState
|
|
|
|
| 9 |
def build_graph(llm_model_name: str = "gpt-4o-mini"):
|
| 10 |
|
| 11 |
# --- Base LLM for agents & synthesizer (swap to your provider as needed) ---
|
| 12 |
+
openai_api_key=os.getenv("openai_api_key")
|
| 13 |
llm = ChatOpenAI(api_key=openai_api_key,model=llm_model_name, temperature=0)
|
| 14 |
|
| 15 |
# --- Create specialized agents ---
|