Dataherald
本 notebook 将介绍如何使用 dataherald 组件。
首先,您需要设置您的 Dataherald 账户并获取您的 API KEY:
- 前往 dataherald 并在此处 注册
- 登录您的 Admin Console 后,创建一个 API KEY
- pip install dataherald
然后,我们需要设置一些环境变量:
- 将您的 API KEY 保存到 DATAHERALD_API_KEY 环境变量中
pip install dataherald
%pip install --upgrade --quiet langchain-community
import os
os.environ["DATAHERALD_API_KEY"] = ""
from langchain_community.utilities.dataherald import DataheraldAPIWrapper
API Reference:DataheraldAPIWrapper
dataherald = DataheraldAPIWrapper(db_connection_id="65fb766367dd22c99ce1a12d")
dataherald.run("How many employees are in the company?")
'select COUNT(*) from employees'
Related
- Tool conceptual guide
- Tool how-to guides