mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-14 05:31:40 +00:00
feat(core): APP use new SDK component (#1050)
This commit is contained in:
@@ -1,24 +1,12 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
import json
|
||||
import logging
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from dbgpt.util.json_utils import serialize
|
||||
|
||||
|
||||
class DbDataLoader:
|
||||
def get_table_view_by_conn(self, data, speak, sql: str = None):
|
||||
# import pandas as pd
|
||||
#
|
||||
# ### tool out data to table view
|
||||
# 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)
|
||||
# table_str = "".join(html_table.split())
|
||||
# html = f"""<div class="w-full overflow-auto">{table_str}</div>"""
|
||||
# view_text = f"##### {str(speak)}" + "\n" + html.replace("\n", " ")
|
||||
# return view_text
|
||||
|
||||
param = {}
|
||||
api_call_element = ET.Element("chart-view")
|
||||
err_msg = None
|
||||
|
Reference in New Issue
Block a user