fix: LangFlow -> Langflow

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-12 19:30:37 -03:00
commit 049ba108bb
20 changed files with 196 additions and 177 deletions

View file

@ -1,9 +1,9 @@
# Serp API Tool
The [Serp API](https://serpapi.com/) (Search Engine Results Page) allows developers to scrape results from search engines such as Google, Bing and Yahoo, and can be used as in LangFlow through the `Search` component.
The [Serp API](https://serpapi.com/) (Search Engine Results Page) allows developers to scrape results from search engines such as Google, Bing and Yahoo, and can be used as in Langflow through the `Search` component.
:::info
To use the Serp API, you first need to sign up [Serp API](https://serpapi.com/) for an API key on the provider's website.
To use the Serp API, you first need to sign up [Serp API](https://serpapi.com/) for an API key on the provider's website.
:::
Here, the `ZeroShotPrompt` component specifies a prompt template for the `ZeroShotAgent`. Set a _Prefix_ and _Suffix_ with rules for the agent to obey. In the example, we used default templates.
@ -14,33 +14,32 @@ The `LLMChain` is a simple chain that takes in a prompt template, formats it wit
In this example, we used [`ChatOpenAI`](https://platform.openai.com/) as the LLM, but feel free to experiment with other Language Models!
:::
The `ZeroShotAgent` takes the `LLMChain` and the `Search` tool as inputs, using the tool to find information when necessary.
:::info
Learn more about the Serp API [here](https://python.langchain.com/docs/modules/agents/tools/integrations/serpapi).
:::
## ⛓️ LangFlow Example
## ⛓️ Langflow Example
import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';
import ZoomableImage from '/src/theme/ZoomableImage.js';
import ThemedImage from "@theme/ThemedImage";
import useBaseUrl from "@docusaurus/useBaseUrl";
import ZoomableImage from "/src/theme/ZoomableImage.js";
<ZoomableImage
alt="Docusaurus themed image"
sources={{
light: 'img/serp-api-tool.png',
light: "img/serp-api-tool.png",
}}
/>
#### <a target="\_blank" href="json_files/SerpAPI_Tool.json" download>Download Flow</a>
#### <a target="\_blank" href="json_files/SerpAPI_Tool.json" download>Download Flow</a>
:::note LangChain Components 🦜🔗
- [`ZeroShotPrompt`](https://python.langchain.com/docs/modules/model_io/prompts/prompt_templates/)
- [`OpenAI`](https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai)
- [`LLMChain`](https://python.langchain.com/docs/modules/chains/foundational/llm_chain)
- [`Search`](https://python.langchain.com/docs/modules/agents/tools/integrations/serpapi)
- [`ZeroShotAgent`](https://python.langchain.com/docs/modules/agents/how_to/custom_mrkl_agent)
:::
:::