Update README and fix NameError in agent_states.py

This commit is contained in:
Zhaolin99 2025-08-02 19:02:56 -07:00
parent a438acdbbd
commit 57db1c545d
2 changed files with 6 additions and 4 deletions

View File

@ -116,12 +116,12 @@ pip install -r requirements.txt
You will also need the FinnHub API for financial data. All of our code is implemented with the free tier.
```bash
export FINNHUB_API_KEY=$YOUR_FINNHUB_API_KEY
export FINNHUB_API_KEY=your_finnhub_api_key_here
```
You will need the OpenAI API for all the agents.
```bash
export OPENAI_API_KEY=$YOUR_OPENAI_API_KEY
export OPENAI_API_KEY=your_openai_api_key_here
```
### CLI Usage

View File

@ -1,10 +1,11 @@
from typing import Annotated, Sequence
from langchain_core.messages import AnyMessage
from datetime import date, timedelta, datetime
from typing_extensions import TypedDict, Optional
from langchain_openai import ChatOpenAI
from tradingagents.agents import *
from langgraph.prebuilt import ToolNode
from langgraph.graph import END, StateGraph, START, MessagesState
from langgraph.graph import END, StateGraph, START, MessagesState, add_messages
# Researcher team state
@ -47,7 +48,8 @@ class RiskDebateState(TypedDict):
count: Annotated[int, "Length of the current conversation"] # Conversation length
class AgentState(MessagesState):
class AgentState(TypedDict):
messages: Annotated[list[AnyMessage], add_messages]
company_of_interest: Annotated[str, "Company that we are interested in trading"]
trade_date: Annotated[str, "What date we are trading at"]