Skip to main content

Exa

Exa 是一个为人工智能和开发者提供的知识API。

安装和设置

Exa 集成存在于其自己的 第三方库。您可以通过以下方式安装:

%pip install -qU langchain-exa

为了使用该包,您还需要将 EXA_API_KEY 环境变量设置为您的 Exa API 密钥。

检索器

您可以在标准检索管道中使用 ExaSearchRetriever。您可以按如下方式导入它。

查看 使用示例

<!--IMPORTS:[{"imported": "ExaSearchRetriever", "source": "langchain_exa", "docs": "https://python.langchain.com/api_reference/exa/retrievers/langchain_exa.retrievers.ExaSearchRetriever.html", "title": "Exa"}]-->
from langchain_exa import ExaSearchRetriever

工具

您可以将 Exa 作为代理工具使用,具体描述见 Exa 工具调用文档

查看 使用示例

ExaFindSimilarResults

一个查询 Metaphor Search API 并返回 JSON 的工具。

<!--IMPORTS:[{"imported": "ExaFindSimilarResults", "source": "langchain_exa.tools", "docs": "https://python.langchain.com/api_reference/exa/tools/langchain_exa.tools.ExaFindSimilarResults.html", "title": "Exa"}]-->
from langchain_exa.tools import ExaFindSimilarResults

ExaSearchResults

Exa搜索工具。

<!--IMPORTS:[{"imported": "ExaSearchResults", "source": "langchain_exa.tools", "docs": "https://python.langchain.com/api_reference/exa/tools/langchain_exa.tools.ExaSearchResults.html", "title": "Exa"}]-->
from langchain_exa.tools import ExaSearchResults

Was this page helpful?


You can also leave detailed feedback on GitHub.

扫我,入群扫我,找书