Skip to content

Instantly share code, notes, and snippets.

View rbur0425's full-sized avatar

Roland rbur0425

View GitHub Profile
@rbur0425
rbur0425 / blog-bot.py
Created November 6, 2023 21:39
Langchain Autonomous Agent Searches Google And Writes Blog Post
import argparse
from langchain.utilities import GoogleSearchAPIWrapper
from langchain.tools import Tool
import os
from dotenv import load_dotenv
from langchain.llms.openai import OpenAI
from langchain.agents import initialize_agent
from langchain.agents import AgentType
from langchain import hub
from langchain.chat_models import ChatOpenAI