feat(core): APP use new SDK component (#1050)

This commit is contained in:
Fangyin Cheng
2024-01-10 10:39:04 +08:00
committed by GitHub
parent e11b72c724
commit fa8b5b190c
242 changed files with 2768 additions and 2163 deletions

View File

@@ -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