Update README and fix NameError in agent_states.py
This commit is contained in:
parent
a438acdbbd
commit
57db1c545d
|
|
@ -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.
|
You will also need the FinnHub API for financial data. All of our code is implemented with the free tier.
|
||||||
```bash
|
```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.
|
You will need the OpenAI API for all the agents.
|
||||||
```bash
|
```bash
|
||||||
export OPENAI_API_KEY=$YOUR_OPENAI_API_KEY
|
export OPENAI_API_KEY=your_openai_api_key_here
|
||||||
```
|
```
|
||||||
|
|
||||||
### CLI Usage
|
### CLI Usage
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
from typing import Annotated, Sequence
|
from typing import Annotated, Sequence
|
||||||
|
from langchain_core.messages import AnyMessage
|
||||||
from datetime import date, timedelta, datetime
|
from datetime import date, timedelta, datetime
|
||||||
from typing_extensions import TypedDict, Optional
|
from typing_extensions import TypedDict, Optional
|
||||||
from langchain_openai import ChatOpenAI
|
from langchain_openai import ChatOpenAI
|
||||||
from tradingagents.agents import *
|
from tradingagents.agents import *
|
||||||
from langgraph.prebuilt import ToolNode
|
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
|
# Researcher team state
|
||||||
|
|
@ -47,7 +48,8 @@ class RiskDebateState(TypedDict):
|
||||||
count: Annotated[int, "Length of the current conversation"] # Conversation length
|
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"]
|
company_of_interest: Annotated[str, "Company that we are interested in trading"]
|
||||||
trade_date: Annotated[str, "What date we are trading at"]
|
trade_date: Annotated[str, "What date we are trading at"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue