Merge remote-tracking branch 'origin/main' into TY_07_DEV

This commit is contained in:
yhjun1026 2023-07-27 17:56:55 +08:00
commit 0b33943dd9
5 changed files with 4 additions and 74 deletions

View File

@ -14,7 +14,7 @@ project = "DB-GPT"
copyright = "2023, csunny"
author = "csunny"
version = "👏👏 0.3.0"
version = "👏👏 0.3.2"
html_title = project + " " + version
# -- General configuration ---------------------------------------------------

45
echarts.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -420,14 +420,14 @@ class Database:
def get_indexes(self, table_name):
"""Get table indexes about specified table."""
session = self._db_sessions()
cursor = session.execute(text(f"SHOW INDEXES FROM {table_name}"))
cursor = session.execute(text(f"SHOW INDEXES FROM `{table_name}`"))
indexes = cursor.fetchall()
return [(index[2], index[4]) for index in indexes]
def get_show_create_table(self, table_name):
"""Get table show create table about specified table."""
session = self._db_sessions()
cursor = session.execute(text(f"SHOW CREATE TABLE {table_name}"))
cursor = session.execute(text(f"SHOW CREATE TABLE `{table_name}`"))
ans = cursor.fetchall()
res = ans[0][1]
res = re.sub(r"\s*ENGINE\s*=\s*InnoDB\s*", " ", res, flags=re.IGNORECASE)

25
run.sh
View File

@ -1,25 +0,0 @@
#!/bin/bash
function find_python_command() {
if command -v python &> /dev/null
then
echo "python"
elif command -v python3 &> /dev/null
then
echo "python3"
else
echo "Python not found. Please install python."
exit 1
fi
}
PYTHONCMD=$(find_python_command)
nohup $PYTHONCMD pilot/server/llmserver.py >> /root/server.log 2>&1 &
while [ `grep -c "Uvicorn running on" /root/server.log` -eq '0' ];do
sleep 1s;
echo "wait server running"
done
echo "server running"
$PYTHONCMD pilot/server/webserver.py

View File

@ -19,7 +19,7 @@ def parse_requirements(file_name: str) -> List[str]:
setuptools.setup(
name="db-gpt",
packages=find_packages(),
version="0.3.1",
version="0.3.2",
author="csunny",
author_email="cfqcsunny@gmail.com",
description="DB-GPT is an experimental open-source project that uses localized GPT large models to interact with your data and environment."