add google jobs
This commit is contained in:
parent
767104cac8
commit
fd20f8d694
@ -3,15 +3,17 @@ from langchain.agents import AgentExecutor, create_react_agent, load_tools
|
||||
from langchain.tools import tool
|
||||
from langchain_openai import ChatOpenAI
|
||||
from langchain_community.utilities.dalle_image_generator import DallEAPIWrapper
|
||||
from langchain_community.tools.google_jobs import GoogleJobsQueryRun
|
||||
from langchain_community.utilities.google_jobs import GoogleJobsAPIWrapper
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from tools import lookup_ip, lookup_name
|
||||
from langsmith import Client
|
||||
|
||||
"""
|
||||
This is the main runner of the custom agent. Agent tools are defined seperatly and imported from tools.py
|
||||
This is the main runner of the custom agent. Custom agent tools are defined seperatly and imported from tools.py
|
||||
|
||||
So far, wholly adapted from https://github.com/wu4f/cs410g-src/blob/main/04_Agents/07_tools_custom_agent.py
|
||||
Adapted from https://github.com/wu4f/cs410g-src/blob/main/04_Agents/07_tools_custom_agent.py
|
||||
|
||||
"""
|
||||
|
||||
@ -22,7 +24,7 @@ load_dotenv()
|
||||
#client = Client()
|
||||
llm = ChatOpenAI(model_name="gpt-4-turbo", temperature=0)
|
||||
|
||||
tools = load_tools(["serpapi", "terminal", "dalle-image-generator"], allow_dangerous_tools=True)
|
||||
tools = load_tools(["serpapi", "terminal", "dalle-image-generator", "google-jobs"], allow_dangerous_tools=True, llm=llm)
|
||||
tools.extend([lookup_name, lookup_ip])
|
||||
|
||||
base_prompt = hub.pull("langchain-ai/react-agent-template")
|
||||
|
@ -2,7 +2,6 @@ from langchain_core.pydantic_v1 import BaseModel, Field, root_validator
|
||||
from langchain.tools import tool
|
||||
import dns.resolver, dns.reversename
|
||||
import validators
|
||||
import validators
|
||||
|
||||
"""
|
||||
Tools to be run by my custom agent.
|
||||
|
Reference in New Issue
Block a user