adsd
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m0s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m0s
This commit is contained in:
parent
545848844c
commit
46641528b9
@ -9,6 +9,7 @@ const { MessageHistory } = require('./src/message_history.js');
|
||||
const app = express();
|
||||
const server = http.createServer(app);
|
||||
const io = socketIo(server, {
|
||||
path: '/emotion-male-app/socket.io',
|
||||
pingTimeout: 300000, // 60秒超时
|
||||
pingInterval: 25000, // 25秒心跳间隔
|
||||
upgradeTimeout: 30000, // 30秒升级超时
|
||||
|
||||
@ -19,7 +19,7 @@ async function initializeHistoryMessage(recentCount = 5) {
|
||||
if (isInitialized) return historyMessage;
|
||||
|
||||
try {
|
||||
const response = await fetch(`/api/messages/for-llm?includeSystem=true&recentCount=${recentCount}`);
|
||||
const response = await fetch(`/emotion-male-app/api/messages/for-llm?includeSystem=true&recentCount=${recentCount}`);
|
||||
if (!response.ok) {
|
||||
throw new Error('获取历史消息失败');
|
||||
}
|
||||
@ -79,7 +79,7 @@ async function saveMessage(userInput, assistantResponse) {
|
||||
return;
|
||||
}
|
||||
|
||||
const response = await fetch('/api/messages/save', {
|
||||
const response = await fetch('/emotion-male-app/api/messages/save', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
@ -81,7 +81,7 @@ export function getLLMConfig(sceneApiKey = null) {
|
||||
// 新增:根据场景获取LLM配置
|
||||
export async function getLLMConfigByScene() {
|
||||
try {
|
||||
const response = await fetch('/api/current-scene');
|
||||
const response = await fetch('/emotion-male-app/api/current-scene');
|
||||
const sceneData = await response.json();
|
||||
|
||||
return {
|
||||
|
||||
@ -172,7 +172,9 @@ class WebRTCChat {
|
||||
}
|
||||
|
||||
initializeSocket() {
|
||||
this.socket = io();
|
||||
this.socket = io({
|
||||
path: '/emotion-male-app/socket.io',
|
||||
});
|
||||
|
||||
this.socket.on('connect', () => {
|
||||
this.updateStatus('已连接到服务器', 'connected');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user