Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	兼容性措施
Browse files
    	
        request_llm/bridge_chatgpt.py
    CHANGED
    
    | 
         @@ -169,7 +169,7 @@ def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], system_promp 
     | 
|
| 169 | 
         
             
                    while True:
         
     | 
| 170 | 
         
             
                        chunk = next(stream_response)
         
     | 
| 171 | 
         
             
                        # print(chunk.decode()[6:])
         
     | 
| 172 | 
         
            -
                        if is_head_of_the_stream:
         
     | 
| 173 | 
         
             
                            # 数据流的第一帧不携带content
         
     | 
| 174 | 
         
             
                            is_head_of_the_stream = False; continue
         
     | 
| 175 | 
         | 
| 
         | 
|
| 169 | 
         
             
                    while True:
         
     | 
| 170 | 
         
             
                        chunk = next(stream_response)
         
     | 
| 171 | 
         
             
                        # print(chunk.decode()[6:])
         
     | 
| 172 | 
         
            +
                        if is_head_of_the_stream and (r'"object":"error"' not in chunk.decode()):
         
     | 
| 173 | 
         
             
                            # 数据流的第一帧不携带content
         
     | 
| 174 | 
         
             
                            is_head_of_the_stream = False; continue
         
     | 
| 175 | 
         |