| 
														
															@@ -54,9 +54,14 @@ class LLMCallbackHandler: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     continue 
														 | 
														
														 | 
														
															                     continue 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 choice = chunk.choices[0] 
														 | 
														
														 | 
														
															                 choice = chunk.choices[0] 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                logging.debug(choice) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                delta = choice.delta 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                logging.debug(delta) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                # logging.debug(choice) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                delta = None 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if hasattr(choice, "delta"): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    delta = choice.delta 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    # logging.debug(delta) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                elif hasattr(choice, "message"): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    delta = choice.message 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    # logging.debug(delta) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if not delta: 
														 | 
														
														 | 
														
															                 if not delta: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     if chunk.usage: 
														 | 
														
														 | 
														
															                     if chunk.usage: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         self.event_handler.pub_message_usage(chunk) 
														 | 
														
														 | 
														
															                         self.event_handler.pub_message_usage(chunk) 
														 |