Skip to content

Instantly share code, notes, and snippets.

Created March 27, 2023 01:56
  • Star 44 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
from langchain.llms import Anthropic
from langchain.agents import load_tools, initialize_agent
from import AIPluginTool
PREFIX = """\n\nHuman: Answer the following questions as best you can. You have access to the following tools:"""
SUFFIX = """Begin!
Question: {input}
tool = AIPluginTool.from_plugin_url("")
llm = Anthropic(temperature=0)
tools = load_tools(["requests"] )
tools += [tool]
agent_kwargs = {"prefix": PREFIX, "suffix": SUFFIX}
agent_chain = initialize_agent(
tools, llm, agent="zero-shot-react-description", verbose=True, agent_kwargs=agent_kwargs
)"what t shirts are available in klarna?")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment