fix: use language-neutral test message for reconnect endpoint
Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/37db3285-91fb-4df3-83a0-7315b0efa428 Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
parent
3fedcab0d9
commit
4547000dd6
|
|
@ -313,7 +313,7 @@ app.post('/api/chat/reconnect', async (_req, res) => {
|
||||||
if (gwStats.availableModels > 0) {
|
if (gwStats.availableModels > 0) {
|
||||||
// 发送一条简短测试消息验证真实连通性
|
// 发送一条简短测试消息验证真实连通性
|
||||||
try {
|
try {
|
||||||
const testResult = await domesticGateway.chat('reconnect-test', '你好');
|
const testResult = await domesticGateway.chat('reconnect-test', 'ping');
|
||||||
if (testResult.success) {
|
if (testResult.success) {
|
||||||
return res.json({
|
return res.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
@ -331,7 +331,7 @@ app.post('/api/chat/reconnect', async (_req, res) => {
|
||||||
// 降级到通用聊天引擎测试
|
// 降级到通用聊天引擎测试
|
||||||
if (chatEngine) {
|
if (chatEngine) {
|
||||||
try {
|
try {
|
||||||
const testResult = await chatEngine.chat('reconnect-test', '你好');
|
const testResult = await chatEngine.chat('reconnect-test', 'ping');
|
||||||
if (testResult.message && testResult.model !== 'offline') {
|
if (testResult.message && testResult.model !== 'offline') {
|
||||||
return res.json({
|
return res.json({
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue