
Security News
/Research
npm Phishing Email Targets Developers with Typosquatted Domain
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
A LangChain integration for the Linkup API, allowing easy integration with Linkup's services. 🔗
Simply install the LangChain integration using pip
:
pip install langchain-linkup
🔑 Obtain an API Key:
Sign up on Linkup to get your API key.
⚙️ Set-up the API Key:
Option 1: Export the LINKUP_API_KEY
environment variable in your shell before using the Linkup
LangChain component.
export LINKUP_API_KEY='YOUR_LINKUP_API_KEY'
Option 2: Set the LINKUP_API_KEY
environment variable directly within Python, using for
instance os.environ
or python-dotenv with a
.env
file (python-dotenv
needs to be installed separately in this case), before creating the
Linkup LangChain component.
import os
from langchain_linkup import LinkupSearchRetriever
os.environ["LINKUP_API_KEY"] = "YOUR_LINKUP_API_KEY"
# or dotenv.load_dotenv()
retriever = LinkupSearchRetriever(...)
...
Option 3: Pass the Linkup API key to the Linkup LangChain component when creating it.
from langchain_linkup import LinkupSearchRetriever
retriever = LinkupSearchRetriever(api_key="YOUR_LINKUP_API_KEY", ...)
...
All search queries can be used with two very different modes:
depth="standard"
, the search will be straightforward and fast, suited for relatively simple
queries (e.g. "What's the weather in Paris today?")depth="deep"
, the search will use an agentic workflow, which makes it in general slower,
but it will be able to solve more complex queries (e.g. "What is the company profile of LangChain
accross the last few years, and how does it compare to its concurrents?")A retriever is a LangChain component which simply retrieves documents based on a query. It is
typically the first step of a RAG (Retrival Augmented Generation) pipeline. See
this page for more information. The
LinkupSearchRetriever
makes available the Linkup API search as a LangChain retriever.
from langchain_linkup import LinkupSearchRetriever
# Initialize the LangChain component (API key can be read from the environment variable or passed as
# an argument)
retriever = LinkupSearchRetriever(
depth="deep", # "standard" or "deep"
)
# Perform a search query
documents = retriever.invoke(input="What is Linkup, the new French AI startup?")
print(documents)
A tool is a LangChain component which enables agents to perform a specific task, like a web search.
Tools are designed to be called autonomously by the agent, and their output is fed back to the
agent, allowing them to perform some kind of reasoning based on the tool usage. See
this page for more information. The
LinkupSearchTool
makes available the Linkup API search as a LangChain tool.
from langchain_linkup import LinkupSearchTool
# Initialize the LangChain component (API key can be read from the environment variable or passed as
# an argument)
tool = LinkupSearchTool(
depth="deep", # "standard" or "deep"
output_type="searchResults", # "searchResults", "sourcedAnswer" or "structured"
)
# Perform a search query
search_results = tool.invoke(input="What is Linkup, the new French AI startup?")
print(search_results)
See the examples/
directory for more contextualized examples and documentation, for instance on
how to use the Linkup Search Retriever in a simple RAG pipeline.
FAQs
A Langchain integration for the Linkup API
We found that langchain-linkup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
Security News
Knip hits 500 releases with v5.62.0, refining TypeScript config detection and updating plugins as monthly npm downloads approach 12M.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.