DataheraldAPIWrapper#

class langchain_community.utilities.dataherald.DataheraldAPIWrapper[source]#

Bases: BaseModel

Wrapper for Dataherald.

Docs for using:

  1. Go to dataherald and sign up

  2. Create an API key

  3. Save your API key into DATAHERALD_API_KEY env variable

  4. pip install dataherald

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param dataherald_api_key: str | None = None#
param db_connection_id: str [Required]#
run(prompt: str) str[source]#

Generate a sql query through Dataherald and parse result.

Parameters:

prompt (str)

Return type:

str

Examples using DataheraldAPIWrapper