Skip to content

Instantly share code, notes, and snippets.

View TheGreatBonnie's full-sized avatar

The Great Bonnie TheGreatBonnie

View GitHub Profile
@TheGreatBonnie
TheGreatBonnie / research.ts
Last active May 23, 2024 09:22
Research.ts
/**
* 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";
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
font-weight: bold;
line-height: 1.2;
margin-bottom: 1rem;
}