avatarLaxfed Paulacy

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1531

Abstract

entication and translation from natural language to underlying API calls, returning simplified output for LLMs. It offers both API Key and OAuth for signing NLA API requests.</p><h2 id="43c9">Server-side (API Key)</h2><p id="2971">For quick setup and testing, the server-side approach is suitable. Here, LangChain will use actions exposed in the developer’s Zapier account and their connected accounts on Zapier.com.</p><h2 id="3be9">User-facing (OAuth)</h2><p id="65e1">For production scenarios where an end-user facing application is being deployed, LangChain can use the user-facing OAuth to access end-user’s exposed actions and connected accounts on Zapier.com.</p><h2 id="d085">LangChain Integration</h2><p id="bfe5">The integration of Zapier NLA into LangChain’s Python and typescript Tool and Toolkit provides LangChain agents and chains with extensive capabilities.</p><p id="6497">To use the integration, retrieve an NLA API Key, set the <code>ZAPIER_NLA_API_KEY</code> environment variable, and create a Toolkit and agent using the following code snippets:</p><div id="4237"><pre><span class="hljs-attr">llm</span> = OpenAI(temperature=<span class="hljs-number">0</span>) <span class="hljs-attr">zapier</span> = ZapierNLAWrapper() <span class="hljs-attr">toolkit</span> = ZapierToolkit.from_zapier_nla_wrapper(zapier) <span class="hljs-attr">agent</span> = initialize_agent(toolkit.get_tools(), llm, agent=<span class="hljs-string">"zero-shot-react-description"</span>, verbose=<span class="hljs-literal">True</span>)</pr

Options

e></div><p id="9880">The <code>ZapierToolkit</code> automatically registers all enabled Zapier actions as tools with the correct name and descriptions. Additionally, an individual action can be registered as a tool manually using the <code>ZapierNLARunAction</code> tool.</p><p id="1080">For a practical example, consider an agent with access to email and Slack. The agent can summarize the latest email received from a specific bank and send it to a Slack channel.</p><p id="8aac">This integration provides LangChain with the ability to access and utilize a wide range of applications and actions available on Zapier’s platform, enhancing the capabilities of LangChain agents and chains.</p><p id="6be5">By following the steps outlined above, you can seamlessly integrate Zapier NLA into LangChain, unlocking its full potential for natural language API interactions.</p><div id="6c58" class="link-block"> <a href="https://readmedium.com/langchain-what-are-gradio-llm-agents-64b988024e26"> <div> <div> <h2>LANGCHAIN — What Are Gradio LLM Agents?</h2> <div><h3>I’m not a great programmer; I’m just a good programmer with great habits. — Kent Beck</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*nu7ZXSdSXeo6aCLEJYoZpg.jpeg)"></div> </div> </div> </a> </div></article></body>

LANGCHAIN — What Is the Langchain Zapier NLA?

The most technologically efficient machine that man has ever invented is the book. — Northrop Frye

LangChain Zapier NLA is a powerful integration that allows LangChain agents and chains to access a wide range of apps and actions on Zapier’s platform through a natural language API interface. With this integration, LangChain users can access over 5,000 apps and 20,000 actions on Zapier’s platform, providing limitless possibilities for LangChain agents.

Zapier NLA

Zapier NLA handles all the underlying API authentication and translation from natural language to underlying API calls, returning simplified output for LLMs. It offers both API Key and OAuth for signing NLA API requests.

Server-side (API Key)

For quick setup and testing, the server-side approach is suitable. Here, LangChain will use actions exposed in the developer’s Zapier account and their connected accounts on Zapier.com.

User-facing (OAuth)

For production scenarios where an end-user facing application is being deployed, LangChain can use the user-facing OAuth to access end-user’s exposed actions and connected accounts on Zapier.com.

LangChain Integration

The integration of Zapier NLA into LangChain’s Python and typescript Tool and Toolkit provides LangChain agents and chains with extensive capabilities.

To use the integration, retrieve an NLA API Key, set the ZAPIER_NLA_API_KEY environment variable, and create a Toolkit and agent using the following code snippets:

llm = OpenAI(temperature=0)
zapier = ZapierNLAWrapper()
toolkit = ZapierToolkit.from_zapier_nla_wrapper(zapier)
agent = initialize_agent(toolkit.get_tools(), llm, agent="zero-shot-react-description", verbose=True)

The ZapierToolkit automatically registers all enabled Zapier actions as tools with the correct name and descriptions. Additionally, an individual action can be registered as a tool manually using the ZapierNLARunAction tool.

For a practical example, consider an agent with access to email and Slack. The agent can summarize the latest email received from a specific bank and send it to a Slack channel.

This integration provides LangChain with the ability to access and utilize a wide range of applications and actions available on Zapier’s platform, enhancing the capabilities of LangChain agents and chains.

By following the steps outlined above, you can seamlessly integrate Zapier NLA into LangChain, unlocking its full potential for natural language API interactions.

Langchain
Zapier
ChatGPT
Recommended from ReadMedium