mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-12 21:11:43 +00:00
community[minor]: Add Datahareld tool (#19680)
**Description:** Integrate [dataherald](https://www.dataherald.com) tool, It is a natural language-to-SQL tool. **Dependencies:** Install dataherald sdk to use it, ``` pip install dataherald ``` --------- Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com> Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Christophe Bornet <cbornet@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
ece008f117
commit
450c458f8f
@@ -0,0 +1,9 @@
|
||||
"""Integration test for Dataherald API Wrapper."""
|
||||
from langchain_community.utilities.dataherald import DataheraldAPIWrapper
|
||||
|
||||
|
||||
def test_call() -> None:
|
||||
"""Test that call gives the correct answer."""
|
||||
search = DataheraldAPIWrapper(db_connection_id="65fb766367dd22c99ce1a12d")
|
||||
output = search.run("How many employees are in the company?")
|
||||
assert "Answer: SELECT \n COUNT(*) FROM \n employees" in output
|
@@ -36,6 +36,7 @@ EXPECTED_ALL = [
|
||||
"ConneryAction",
|
||||
"CopyFileTool",
|
||||
"CurrentWebPageTool",
|
||||
"DataheraldTextToSQL",
|
||||
"DeleteFileTool",
|
||||
"DuckDuckGoSearchResults",
|
||||
"DuckDuckGoSearchRun",
|
||||
|
@@ -37,6 +37,7 @@ _EXPECTED = [
|
||||
"ConneryAction",
|
||||
"CopyFileTool",
|
||||
"CurrentWebPageTool",
|
||||
"DataheraldTextToSQL",
|
||||
"DeleteFileTool",
|
||||
"DuckDuckGoSearchResults",
|
||||
"DuckDuckGoSearchRun",
|
||||
|
@@ -8,6 +8,7 @@ EXPECTED_ALL = [
|
||||
"BibtexparserWrapper",
|
||||
"BingSearchAPIWrapper",
|
||||
"BraveSearchWrapper",
|
||||
"DataheraldAPIWrapper",
|
||||
"DuckDuckGoSearchAPIWrapper",
|
||||
"DriaAPIWrapper",
|
||||
"GoldenQueryAPIWrapper",
|
||||
|
Reference in New Issue
Block a user