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 app = express(); | ||||||
| const server = http.createServer(app); | const server = http.createServer(app); | ||||||
| const io = socketIo(server, { | const io = socketIo(server, { | ||||||
|  |   path: '/emotion-male-app/socket.io', | ||||||
|   pingTimeout: 300000,    // 60秒超时
 |   pingTimeout: 300000,    // 60秒超时
 | ||||||
|   pingInterval: 25000,   // 25秒心跳间隔
 |   pingInterval: 25000,   // 25秒心跳间隔
 | ||||||
|   upgradeTimeout: 30000, // 30秒升级超时
 |   upgradeTimeout: 30000, // 30秒升级超时
 | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ async function initializeHistoryMessage(recentCount = 5) { | |||||||
|     if (isInitialized) return historyMessage; |     if (isInitialized) return historyMessage; | ||||||
|      |      | ||||||
|     try { |     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) { |         if (!response.ok) { | ||||||
|             throw new Error('获取历史消息失败'); |             throw new Error('获取历史消息失败'); | ||||||
|         } |         } | ||||||
| @ -79,7 +79,7 @@ async function saveMessage(userInput, assistantResponse) { | |||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         const response = await fetch('/api/messages/save', { |         const response = await fetch('/emotion-male-app/api/messages/save', { | ||||||
|             method: 'POST', |             method: 'POST', | ||||||
|             headers: { |             headers: { | ||||||
|                 'Content-Type': 'application/json' |                 'Content-Type': 'application/json' | ||||||
|  | |||||||
| @ -81,7 +81,7 @@ export function getLLMConfig(sceneApiKey = null) { | |||||||
| // 新增:根据场景获取LLM配置
 | // 新增:根据场景获取LLM配置
 | ||||||
| export async function getLLMConfigByScene() { | export async function getLLMConfigByScene() { | ||||||
|   try { |   try { | ||||||
|     const response = await fetch('/api/current-scene'); |     const response = await fetch('/emotion-male-app/api/current-scene'); | ||||||
|     const sceneData = await response.json(); |     const sceneData = await response.json(); | ||||||
|      |      | ||||||
|     return { |     return { | ||||||
|  | |||||||
| @ -172,7 +172,9 @@ class WebRTCChat { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     initializeSocket() { |     initializeSocket() { | ||||||
|         this.socket = io(); |         this.socket = io({ | ||||||
|  |             path: '/emotion-male-app/socket.io', | ||||||
|  |         }); | ||||||
|          |          | ||||||
|         this.socket.on('connect', () => { |         this.socket.on('connect', () => { | ||||||
|             this.updateStatus('已连接到服务器', 'connected'); |             this.updateStatus('已连接到服务器', 'connected'); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Song367
						Song367