添加过滤时的打印
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m53s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m53s
				
			This commit is contained in:
		
							parent
							
								
									06aa52f152
								
							
						
					
					
						commit
						b1c0656bb4
					
				| @ -102,7 +102,7 @@ async function requestLLMStream({ apiKey, model, messages, onSegment }) { | |||||||
|               const deltaContent = obj.choices[0].delta.content; |               const deltaContent = obj.choices[0].delta.content; | ||||||
|               content += deltaContent; |               content += deltaContent; | ||||||
|               pendingText += deltaContent; |               pendingText += deltaContent; | ||||||
|               console.log('LLM内容片段:', deltaContent); |               console.log('【未过滤】LLM内容片段:', pendingText); | ||||||
|                |                | ||||||
|               // 先过滤旁白,再检查分段分隔符
 |               // 先过滤旁白,再检查分段分隔符
 | ||||||
|               const filteredPendingText = filterNarration(pendingText); |               const filteredPendingText = filterNarration(pendingText); | ||||||
| @ -128,7 +128,7 @@ async function requestLLMStream({ apiKey, model, messages, onSegment }) { | |||||||
|                      |                      | ||||||
|                     // 如果累积文本长度大于5个字,处理它
 |                     // 如果累积文本长度大于5个字,处理它
 | ||||||
|                     if (accumulatedText.length > 8 && onSegment) { |                     if (accumulatedText.length > 8 && onSegment) { | ||||||
|                       console.log('检测到完整段落:', accumulatedText); |                       console.log('【已过滤】检测到完整段落:', accumulatedText); | ||||||
|                       // 文本已经过滤过旁白,直接使用
 |                       // 文本已经过滤过旁白,直接使用
 | ||||||
|                       if (accumulatedText.trim()) { |                       if (accumulatedText.trim()) { | ||||||
|                         console.log('处理过滤后的文本:', accumulatedText); |                         console.log('处理过滤后的文本:', accumulatedText); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Song367
						Song367