Clickhouse SQL Database Agent
Labels: name: area: agent, name: auto:bug

### System Info

Python 3.10.11
Mac M1
Langchain Version: 0.0.353
openai Version: 0.28.0

### Who can help?

@hwchase17 

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [X] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

from langchain.agents import create_sql_agent
from langchain.agents.agent_toolkits import SQLDatabaseToolkit
from langchain.agents.agent_types import AgentType
from langchain.llms.openai import OpenAI
from langchain.sql_database import SQLDatabase

db = SQLDatabase.from_uri("clickhouse+http://clickhouse_admin:P%21%40ssword42%21@localhost:8123/idfyDB")

toolkit = SQLDatabaseToolkit(db=db, llm=OpenAI(temperature=0))

agent_executor = create_sql_agent(
    llm=OpenAI(model_name='gpt-4', temperature=0),
    toolkit=toolkit,
    verbose=True,
    agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
)

agent_executor.run("Describe table sample_tbl")


### Expected behavior

The SQLDatabase toolkit should be able to query the clickhouse database as I have installed and provided the right dialect and connecting directly via sqlalchemy works fine. The issue is langchain's sql database toolkit somehow is unable to query the clickhouse database, it works fine for the chinook db sqlite file. Logs for reference - 

> Entering new AgentExecutor chain...
Action: sql_db_list_tables
Action Input:
Observation:
Thought:I need to check the tables in the database to see if there is an "eve_tasks_executed" table.
Action: sql_db_list_tables
Action Input:
Observation:
Thought:Traceback (most recent call last):
  File "/Users/vivekkalyanarangan/opt/anaconda3/envs/streaml/lib/python3.10/site-packages/langchain/agents/agent.py", line 1066, in _iter_next_step
    output = self.agent.plan(
  File "/Users/vivekkalyanarangan/opt/anaconda3/envs/streaml/lib/python3.10/site-packages/langchain/agents/agent.py", line 636, in plan
    return self.output_parser.parse(full_output)
  File "/Users/vivekkalyanarangan/opt/anaconda3/envs/streaml/lib/python3.10/site-packages/langchain/agents/mrkl/output_parser.py", line 63, in parse
    raise OutputParserException(
langchain_core.exceptions.OutputParserException: Could not parse LLM output: `I don't know the answer to the question because I don't have access to the list of tables in the database.`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

    agent_executor.run("Run select * query on eve_tasks_executed table")
    return self(args[0], callbacks=callbacks, tags=tags, metadata=metadata)[
    raise e
    self._call(inputs, run_manager=run_manager)
    next_step_output = self._take_next_step(
    [
    [
    raise ValueError(
ValueError: An output parsing error occurred. In order to pass this error back to the agent and have it try again, pass `handle_parsing_errors=True` to the AgentExecutor. This is the error: Could not parse LLM output: `I don't know the answer to the question because I don't have access to the list of tables in the database.` [hidden file names]