NAVER
All functionality related to Naver
, including HyperCLOVA X models, particularly those accessible through Naver Cloud
CLOVA Studio.
Naver is a global technology company with cutting-edge technologies and a diverse business portfolio including search, commerce, fintech, content, cloud, and AI.
Naver Cloud is the cloud computing arm of Naver, a leading cloud service provider offering a comprehensive suite of cloud services to businesses through its Naver Cloud Platform (NCP).
Please refer to NCP User Guide for more detailed instructions (also in Korean).
Installation and Setup
- Get a CLOVA Studio API Key by issuing it and set it as an environment variable (
CLOVASTUDIO_API_KEY
).
Naver integrations live in two packages:
langchain-naver
: a dedicated integration package for Naver.langchain-naver-community
: a community-maintained package and is not officially maintained by Naver or LangChain.
pip install -U langchain-naver
# pip install -U langchain-naver-community // Install to use Naver Search tool.
(Note) Naver integration via
langchain-community
, a collection of third-party integrations, is outdated.
- Use
langchain-naver
instead as new features should only be implemented via this package.- If you are using
langchain-community
(outdated) and got a legacy API Key (that doesn't start withnv-*
prefix), you should set it asNCP_CLOVASTUDIO_API_KEY
, and might need to get an additional API Gateway API Key by creating your app and set it asNCP_APIGW_API_KEY
.
Chat models
ChatClovaX
See a usage example.
from langchain_naver import ChatClovaX
Embedding models
ClovaXEmbeddings
See a usage example.
from langchain_naver import ClovaXEmbeddings
Tools
Naver Search
The Naver Search integration allows your LangChain applications to retrieve information from Naver's search engine. This is particularly useful for Korean language queries and getting up-to-date information about Korean topics.
To use the Naver Search tools, you need to:
- Sign in to the Naver Developers portal
- Create a new application and enable the Search API
- Obtain your NAVER_CLIENT_ID and NAVER_CLIENT_SECRET from the "Application List" section
- Set these as environment variables in your application
from langchain_naver_community.tool import NaverSearchResults
from langchain_naver_community.utils import NaverSearchAPIWrapper
# Set up the search wrapper
search = NaverSearchAPIWrapper()
# Create a tool
tool = NaverSearchResults(api_wrapper=search)
See a usage example for more details.
Specialized Search Tools
The package also provides specialized search tools for different types of content:
from langchain_naver_community.tool import NaverNewsSearch # For news articles
from langchain_naver_community.tool import NaverBlogSearch # For blog posts
from langchain_naver_community.tool import NaverImageSearch # For images
Each of these can be used within LangChain agents to provide more targeted search capabilities.