8 Commits

Author SHA1 Message Date
QJ_wonder
e3dacc6172 Merge fa65b6eff7 into e5a41765b4 2025-06-11 11:16:46 +08:00
柯慕灵
e5a41765b4 fix windows daemon.bat path configuration (#2289)
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run
2025-06-11 10:29:13 +08:00
QJ_wonder
fa65b6eff7 Update NL2PluginParser.java 去除多数据集条件判断 2025-05-28 15:47:58 +08:00
QJ_wonder
0ab44c0866 Merge branch 'tencentmusic:master' into master_fixplugin 2025-05-27 14:54:49 +08:00
QJ_wonder
449fdf180f (fix)(chat)多个数据集也只保留召回的第一个结果
这里的多数据集其实对召回的结果没有影响,取第一个就好了
2025-05-27 14:42:34 +08:00
QJ_wonder
d275a145d5 Update WebServiceQuery.java 2025-05-27 14:07:32 +08:00
QJ_wonder
c8f690c1c2 (fix)(chat) 修改判断是否需要NL2SQL的条件判断
修改判断是否需要NL2SQL的条件判断,如果respone里已经有返回体,则不需要NL2SQL的执行,直接返回。避免插件返回体被NL2SQL返回体覆盖的问题
2025-05-27 13:39:48 +08:00
QJ_wonder
38af6e3a28 (fix)(chat) 修复插件调用问题
修复插件调用问题,将原有的Json解析替换成fastjson的json解析,并按String解析返回体,否则会报:Error while extracting response for type [class java.lang.Object] and content type [application/xml;charset=UTF-8]
2025-05-27 13:34:34 +08:00
3 changed files with 53 additions and 13 deletions

View File

@@ -20,7 +20,9 @@ if "%profile%"=="" (
set "model_name=%service%"
cd %baseDir%
REM fix path configuration - point to the correct release package directory
set "releaseDir=%buildDir%\supersonic-%service%-1.0.0-SNAPSHOT"
cd %releaseDir%
if "%command%"=="restart" (
call :stop
@@ -50,20 +52,58 @@ if "%command%"=="restart" (
:runJavaService
echo 'java service starting, see logs in logs/'
set "libDir=%baseDir%\lib"
set "confDir=%baseDir%\conf"
set "webDir=%baseDir%\webapp"
set "logDir=%baseDir%\logs"
set "classpath=%baseDir%;%webDir%;%libDir%\*;%confDir%"
set "property=-Dfile.encoding=UTF-8 -Duser.language=Zh -Duser.region=CN -Duser.timezone=GMT+08 -Dspring.profiles.active=%profile%"
set "java-command=%property% -Xms1024m -Xmx2048m -cp %CLASSPATH% %MAIN_CLASS%"
echo 'Using release directory: %releaseDir%'
REM use release package directory as base path
set "libDir=%releaseDir%\lib"
set "confDir=%releaseDir%\conf"
set "webDir=%releaseDir%\webapp"
set "logDir=%releaseDir%\logs"
REM fix variable name matching problem
set "CLASSPATH=%releaseDir%;%webDir%;%libDir%\*;%confDir%"
set "MAIN_CLASS=%main_class%"
REM add port configuration
set "property=-Dfile.encoding=UTF-8 -Duser.language=Zh -Duser.region=CN -Duser.timezone=GMT+08 -Dspring.profiles.active=%profile% -Dserver.port=9080"
set "java_command=%property% -Xms1024m -Xmx2048m -cp "%CLASSPATH%" %MAIN_CLASS%"
if not exist %logDir% mkdir %logDir%
start /B java %java-command% >nul 2>&1
timeout /t 10 >nul
REM check if the main jar file exists
if not exist "%libDir%\launchers-standalone-1.0.0-SNAPSHOT.jar" (
echo "Error: Main jar file not found in %libDir%"
echo "Please make sure the application has been built and packaged correctly."
goto :EOF
)
echo 'Main Class: %MAIN_CLASS%'
echo 'Profile: %profile%'
echo 'Starting Java service...'
REM start service and save logs
start /B java %java_command% > "%logDir%\supersonic.log" 2>&1
timeout /t 15 >nul
REM check service status
netstat -an | findstr ":9080" >nul
if errorlevel 1 (
echo "Warning: Port 9080 is not listening"
echo "Please check the log file: %logDir%\supersonic.log"
if exist "%logDir%\supersonic.log" (
echo "Recent log entries:"
powershell -Command "Get-Content '%logDir%\supersonic.log' | Select-Object -Last 10"
)
) else (
echo "Service started successfully on port 9080"
echo "You can access the application at: http://localhost:9080"
)
echo 'java service started'
goto :EOF
:stopJavaService
echo 'Stopping Java service...'
for /f "tokens=2" %%i in ('tasklist ^| findstr /i "java"') do (
taskkill /PID %%i /F
echo "java service (PID = %%i) is killed."

View File

@@ -88,10 +88,10 @@ public class WebServiceQuery extends PluginSemanticQuery {
restTemplate = ContextUtils.getBean(RestTemplate.class);
try {
responseEntity =
restTemplate.exchange(requestUrl, HttpMethod.POST, entity, Object.class);
restTemplate.exchange(requestUrl, HttpMethod.POST, entity, String.class);
objectResponse = responseEntity.getBody();
log.info("objectResponse:{}", objectResponse);
Map<String, Object> response = JsonUtil.objectToMap(objectResponse);
Map<String, Object> response = JSON.parseObject(objectResponse.toString());
webServiceResponse.setResult(response);
} catch (Exception e) {
log.info("Exception:{}", e.getMessage());

View File

@@ -19,7 +19,7 @@ public class ParseContext {
}
public boolean enableNL2SQL() {
return Objects.nonNull(agent) && agent.containsDatasetTool();
return Objects.nonNull(agent) && agent.containsDatasetTool()&&response.getSelectedParses().size() == 0;
}
public boolean enableLLM() {