mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-31 16:39:48 +00:00
@@ -36,8 +36,8 @@ class DbChatOutputParser(BaseOutputParser):
|
||||
|
||||
### tool out data to table view
|
||||
data_loader = DbDataLoader()
|
||||
if len(data) <= 1:
|
||||
data.insert(0, ["result"])
|
||||
if len(data) < 1:
|
||||
data.insert(0, [])
|
||||
df = pd.DataFrame(data[1:], columns=data[0])
|
||||
if not CFG.NEW_SERVER_MODE and not CFG.SERVER_LIGHT_MODE:
|
||||
table_style = """<style>
|
||||
|
@@ -3,7 +3,7 @@ class DbDataLoader:
|
||||
import pandas as pd
|
||||
|
||||
### tool out data to table view
|
||||
if len(data) <= 1:
|
||||
if len(data) < 1:
|
||||
data.insert(0, ["result"])
|
||||
df = pd.DataFrame(data[1:], columns=data[0])
|
||||
html_table = df.to_html(index=False, escape=False, sparsify=False)
|
||||
|
Reference in New Issue
Block a user