智谱API突发恶疾
This commit is contained in:
		
							parent
							
								
									8565a35cf7
								
							
						
					
					
						commit
						f2e73aa580
					
				@ -21,8 +21,8 @@ class ZhipuRequestInstance():
 | 
				
			|||||||
        response = zhipuai.model_api.sse_invoke(
 | 
					        response = zhipuai.model_api.sse_invoke(
 | 
				
			||||||
            model=ZHIPUAI_MODEL,
 | 
					            model=ZHIPUAI_MODEL,
 | 
				
			||||||
            prompt=generate_message_payload(inputs, llm_kwargs, history, system_prompt),
 | 
					            prompt=generate_message_payload(inputs, llm_kwargs, history, system_prompt),
 | 
				
			||||||
            top_p=llm_kwargs['top_p'],
 | 
					            top_p=llm_kwargs['top_p']*0.7,              # 智谱的API抽风,手动*0.7给做个线性变换
 | 
				
			||||||
            temperature=llm_kwargs['temperature'],
 | 
					            temperature=llm_kwargs['temperature']*0.95, # 智谱的API抽风,手动*0.7给做个线性变换
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        for event in response.events():
 | 
					        for event in response.events():
 | 
				
			||||||
            if event.event == "add":
 | 
					            if event.event == "add":
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user