This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.markdown h1, | |
.markdown h2, | |
.markdown h3, | |
.markdown h4, | |
.markdown h5, | |
.markdown h6 { | |
font-weight: bold; | |
line-height: 1.2; | |
margin-bottom: 1rem; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a port of GPT Newspaper to LangGraph JS, adapted from the original Python code. | |
* | |
* https://github.com/assafelovic/gpt-newspaper | |
*/ | |
import { HumanMessage, SystemMessage } from "@langchain/core/messages"; | |
import { ChatOpenAI } from "@langchain/openai"; | |
import { StateGraph, END } from "@langchain/langgraph"; | |
import { RunnableLambda } from "@langchain/core/runnables"; | |
import { TavilySearchAPIRetriever } from "@langchain/community/retrievers/tavily_search_api"; |