-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] [dashboard] 'ClickhouseConnector' object has no attribute 'session' #1493
Comments
I installed the new clickhouse test (24.4.1.2088),used the agent query, and after a few automatic retries, it returned a normal result. 2024-05-07 15:37:08 pnma-ck dbgpt.agent.expand.data_scientist_agent[38979] ERROR DataScientist check exception!'ClickhouseConnector'object has no attribute 'session' Edgar (to PlanManager)-[chatgpt_proxyllm]: "{"display_type":"response_table","sql":"SELECT port FROM bgp_lax2_old_csv ORDER BY port DESC LIMIT 3","thought":"错误信息与SQL语句本身无关,它指出的是执行环境或库的问题,即'ClickhouseConnector'对象缺少执行SQL的'session'属性。确保使用正确的上下文或方法来执行SQL。此SQL语句正确,旨在从'bgp_lax2_old_csv'表中获取'port'列的前三大的值,并以表格形式展示。"}"
2024-05-07 15:37:08 pnma-ck dbgpt.datasource.manages.connect_config_db[38979] INFO Result: <sqlalchemy.engine.cursor.CursorResult object at 0x7f22783f0dc0> PlanManager (to Edgar)-[]: "SQL execution error, please re-read the historical information to fix this SQL. The error message is as follows:'ClickhouseConnector' object has no attribute 'session'" 2024-05-07 15:37:08 pnma-ck dbgpt.agent.core.base_agent[38979] INFO _a_select_llm_model:None model prompt: system: You are a DataScientist,named Edgar,your goal is Use correct clickhouse SQL to analyze and solve tasks based on the data structure information of the database given in the resource. RESOURCES:clickhouse --['bgp_lax2_old_csv(name-dashboard-rowname-country-panelname-device-port-type-isp-bandwidth-highspeed-inid-outid-clock-inmax-outmax-outavg-inavg-inpercent-outpercent)'] *** IMPORTANT REMINDER ***
Please response in the following json format: human: 执行SQL查询,选取'port'列中的最大三个值。 async stream output: 2024-05-07 15:37:08 pnma-ck dbgpt.model.proxy.llms.chatgpt[38979] INFO Send request to openai(1.25.2), payload: {'stream': True, 'model': 'mixtral-8x7b', 'temperature': 0.5, 'max_tokens': 1024} messages: full stream output: model generate_stream params: Edgar (to PlanManager)-[chatgpt_proxyllm]: "{"display_type":"response_table","sql":"SELECT port FROM bgp_lax2_old_csv ORDER BY port DESC LIMIT 3","thought":"尽管有提到'ClickhouseConnector'对象缺少'session'属性的错误,这实际上是一个执行环境问题而非SQL语法问题。SQL本身是正确的,旨在查询'bgp_lax2_old_csv'表中'port'列的前三个最大值。请确保使用正确的库方法或上下文执行此SQL。"}"
PlanManager (to User)-[]: "查询最大的三个端口"
2024-05-07 15:37:15 pnma-ck dbgpt.serve.agent.agents.controller[38979] INFO save agent chat info!82c5c98e-0c44-11ef-8715-a0369fa9eae0 |
it looks the |
Search before asking
Operating system information
Linux
Python version information
3.10
DB-GPT version
main
Related scenes
Installation Information
Installation From Source
Docker Installation
Docker Compose Installation
Cluster Installation
AutoDL Image
Other
Device information
local openai api
Models information
llam3
What happened
Use the dashboard to query clickhouse
clean prompt response: [{ "sql": "SELECT country, port, bandwidth, outmax FROM traffic_data ORDER BY outmax DESC LIMIT 3", "title": "Top 3 Highest Traffic Ports by Country", "showcase": "BarChart", "thoughts": "This SQL query selects the country, port, bandwidth, and the maximum output traffic for the top three ports with the highest output traffic from the 'traffic_data' table. A BarChart is chosen to visually compare the traffic across different countries and ports." }]
2024-05-07 15:00:38 pnma-ck dbgpt.datasource.rdbms.base[26170] INFO Query[SELECT country, port, bandwidth, outmax FROM traffic_data ORDER BY outmax DESC LIMIT 3]
'ClickhouseConnector' object has no attribute 'session'
What you expected to happen
'ClickhouseConnector' object has no attribute 'session'
How to reproduce
Use the dashboard to query clickhouse
ClickHouse client version 22.1.3.7 (official build).
DBGPT 5.5
Additional context
No response
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: