mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 22:46:49 +00:00
(improvement)(project) rename llm to llmParser and optimizing python start scripts and optimizing and optimizing build/start scripts (#91)
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
export APP_NAME=supersonic-chat
|
||||
export MAIN_CLASS=com.tencent.supersonic.ChatLauncher
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
binDir=$(cd "$(dirname "$0")"; pwd)
|
||||
baseDir=$(cd "$sbinDir/.." && pwd -P)
|
||||
libDir=$baseDir/lib
|
||||
confDir=$baseDir/conf
|
||||
webDir=$baseDir/webapp
|
||||
|
||||
source ${baseDir}/bin/env.sh
|
||||
|
||||
|
||||
CLASSPATH=""
|
||||
CLASSPATH=$CLASSPATH:$confDir
|
||||
|
||||
for jarPath in $libDir/*.jar; do
|
||||
CLASSPATH=$CLASSPATH:$jarPath
|
||||
done
|
||||
|
||||
|
||||
|
||||
export CLASSPATH
|
||||
export LANG="zh_CN.UTF-8"
|
||||
|
||||
cd $baseDir
|
||||
|
||||
if [[ "$JAVA_HOME" == "" ]]; then
|
||||
JAVA_HOME=$(ls /usr/jdk64/jdk* -d 2>/dev/null | xargs | awk '{print "'$APP_NAME'"}')
|
||||
fi
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
|
||||
command="-Dfile.encoding="UTF-8" -Duser.language="Zh" -Duser.region="CN" -Duser.timezone="GMT+08" -Xms1024m -Xmx2048m "$MAIN_CLASS
|
||||
|
||||
mkdir -p $baseDir/logs
|
||||
if [[ "$is_test" == "true" ]]; then
|
||||
java -Dspring.profiles.active="dev" $command >/dev/null 2>$baseDir/logs/error.log &
|
||||
else
|
||||
java $command $baseDir >/dev/null 2>$baseDir/logs/error.log &
|
||||
fi
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
binDir=$(cd "$(dirname "$0")"; pwd)
|
||||
baseDir=$(cd "$sbinDir/.." && pwd -P)
|
||||
confDir=$baseDir/conf
|
||||
source ${baseDir}/bin/env.sh
|
||||
|
||||
command=$1
|
||||
|
||||
function start()
|
||||
{
|
||||
pid=$(ps aux | grep $MAIN_CLASS | grep -v grep |grep $baseDir | awk '{print "'$APP_NAME'"}')
|
||||
if [[ "$pid" == "" ]]; then
|
||||
logs=$baseDir/logs/service.sh.log
|
||||
env DEPLOY=true $baseDir/bin/run.sh $MAIN_CLASS && echo "Process started, see logs/error with logs/error command"
|
||||
return 0
|
||||
else
|
||||
echo "Process (PID = $pid) is running."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function stop()
|
||||
{
|
||||
pid=$(ps aux | grep $MAIN_CLASS | grep -v grep|grep $baseDir| awk '{print $2}')
|
||||
if [[ "$pid" == "" ]]; then
|
||||
echo "Process is not running !"
|
||||
return 1
|
||||
else
|
||||
kill -9 $pid
|
||||
echo "Process (PID = $pid) is killed !"
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
case "$command" in
|
||||
start)
|
||||
echo -e "Starting $APP_NAME"
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
echo -e "Stopping $APP_NAME"
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
echo -e "Resetting $APP_NAME"
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Use command {start|stop|status|restart} to run."
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -13,7 +13,7 @@ spring:
|
||||
password: chat
|
||||
|
||||
server:
|
||||
port: 9080
|
||||
port: 9082
|
||||
|
||||
authentication:
|
||||
enable: true
|
||||
|
||||
10
launchers/chat/src/main/resources/optimization.properties
Normal file
10
launchers/chat/src/main/resources/optimization.properties
Normal file
@@ -0,0 +1,10 @@
|
||||
one.detection.size=8
|
||||
one.detection.max.size=20
|
||||
metric.dimension.min.threshold=0.3
|
||||
metric.dimension.threshold=0.3
|
||||
dimension.value.threshold=0.5
|
||||
function.bonus.threshold=201
|
||||
long.text.threshold=0.8
|
||||
short.text.threshold=0.5
|
||||
query.text.length.threshold=10
|
||||
candidate.threshold=0.2
|
||||
Reference in New Issue
Block a user