langflow/docs/serp-api.md
carlosrcoelho 5d2a29a436 add docs
2023-07-18 14:59:27 -03:00

2 KiB

Search is a search engine useful to answer questions about current events. To use the Serp API, you first need to sign up Serp API{.internal-link target=_blank} for an API key on the provider's website.


The Serp API (Search Engine Results Page API) is an API (Application Programming Interface) that allows developers to scrape search engine results from various search engines such as Google, Bing, Yahoo, and more.


Description{width=50%} Description{width=50%}


To understand more, check out the LangChain Search{.internal-link target=_blank} documentation.


⛓️LangFlow example

Description{width=100%} Description{width=100%}


Download Flow{: .md-button download="Serp_api"}


ZeroShotPrompt creates a prompt template for Zero-Shot Agent. You can set the Prefix and Suffix. The Prefix is the text that will be added before the input text. The Suffix is the text that will be added after the input text. In the example, we used the default that is automatically set.


For the example, we used OpenAI as the LLM, but you can use any LLM that has an API. Make sure to get the API key from the LLM provider. For example, OpenAI{.internal-link target=_blank} requires you to create an account to get your API key.


Check out the OpenAI{.internal-link target=_blank} documentation to learn more about the API and the options that contain in the node.


The LLMChain is a simple chain that takes in a prompt template, formats it with the user input, and returns the response from an LLM.


ZeroShotAgent is an agent Agent for the MRKL chain. It uses a Zero Shot LLM to generate a response.