- 
		Home
	
 
	- 
AI Engine
 
- 
3.1.6 (latest)
 
- 
Code
 
- 
Classes
 
-  Meow_MWAI_Core 
 
	
	
		
			
				
					
													
								
																			
											| Total Complexity | 
											311 | 
										
																			
											| Dependencies | 
											41 | 
										
																			
											| Dependents | 
											7 | 
										
																	
							 
													
								
																			
											| Total lines | 
											1,515 | 
										
																			
											| Lines of code | 
											1,128 | 
										
																			
											| Logical lines of code | 
											630 | 
										
																	
							 
													
								
																			
											| Comment lines | 
											187 | 
										
																			
											| Methods | 
											67 | 
										
																			
											| Properties | 
											22 | 
										
																	
							 
											 
				 
									
							 
		 
	 
	Methods 67
	
		
		
			| Method | 
							Rating | 
													
					
						Maintainability
					
				 | 
										
					Complexity
				 | 
										
					Lines of code
				 | 
					
		
		
					
				| update_chatbots() | 
									D  | 
																	29  | 
													45 | 
													103 | 
							
					
				| sanitize_options() | 
									B  | 
																	36 | 
													22 | 
													82 | 
							
					
				| populate_dynamic_options() | 
									B  | 
																	28  | 
													16 | 
													167 | 
							
					
				| init() | 
									B  | 
																	39 | 
													21 | 
													59 | 
							
					
				| get_theme() | 
									B  | 
																	41 | 
													17 | 
													49 | 
							
					
				| get_chatbots() | 
									B  | 
																	44 | 
													17 | 
													44 | 
							
					
				| estimate_tokens() | 
									A  | 
																	50 | 
													11 | 
													25 | 
							
					
				| run_query() | 
									A  | 
																	51 | 
													11 | 
													23 | 
							
					
				| retrieve_context() | 
									A  | 
																	49 | 
													9 | 
													31 | 
							
					
				| get_all_options() | 
									A  | 
																	54 | 
													9 | 
													20 | 
							
					
				| get_post_types() | 
									A  | 
																	52 | 
													8 | 
													23 | 
							
					
				| get_engine_models() | 
									A  | 
																	55 | 
													8 | 
													22 | 
							
					
				| clean_sentences() | 
									A  | 
																	47 | 
													7 | 
													34 | 
							
					
				| sanitize_sort() | 
									S  | 
																	56 | 
													7 | 
													17 | 
							
					
				| stream_push() | 
									S  | 
																	49 | 
													6 | 
													31 | 
							
					
				| format_discussion_date() | 
									S  | 
																	52 | 
													6 | 
													26 | 
							
					
				| get_image_resolution() | 
									S  | 
																	54 | 
													6 | 
													21 | 
							
					
				| get_post() | 
									S  | 
																	51 | 
													4 | 
													27 | 
							
					
				| get_themes() | 
									S  | 
																	51 | 
													4 | 
													27 | 
							
					
				| get_mime_type() | 
									S  | 
																	52 | 
													4 | 
													23 | 
							
					
				| register_scripts() | 
									S  | 
																	58 | 
													4 | 
													14 | 
							
					
				| is_image() | 
									S  | 
																	62 | 
													4 | 
													11 | 
							
					
				| get_post_content() | 
									S  | 
																	54 | 
													3 | 
													23 | 
							
					
				| do_placeholders() | 
									S  | 
																	61 | 
													3 | 
													12 | 
							
					
				| get_random_id() | 
									S  | 
																	61 | 
													3 | 
													12 | 
							
					
				| __construct() | 
									S  | 
																	57 | 
													2 | 
													16 | 
							
					
				| enqueue_themes() | 
									S  | 
																	67 | 
													3 | 
													8 | 
							
					
				| get_chatbot() | 
									S  | 
																	65 | 
													3 | 
													9 | 
							
					
				| update_ai_env() | 
									S  | 
																	63 | 
													3 | 
													10 | 
							
					
				| get_post_language() | 
									S  | 
																	61 | 
													2 | 
													11 | 
							
					
				| enqueue_theme() | 
									S  | 
																	71 | 
													2 | 
													6 | 
							
					
				| can_access_features() | 
									S  | 
																	74 | 
													2 | 
													4 | 
							
					
				| safe_strlen() | 
									S  | 
																	67 | 
													2 | 
													8 | 
							
					
				| is_url() | 
									S  | 
																	77 | 
													2 | 
													3 | 
							
					
				| update_options() | 
									S  | 
																	68 | 
													2 | 
													7 | 
							
					
				| track_cron_end() | 
									S  | 
																	63 | 
													2 | 
													10 | 
							
					
				| can_start_session() | 
									S  | 
																	81 | 
													1 | 
													3 | 
							
					
				| can_access_settings() | 
									S  | 
																	79 | 
													1 | 
													3 | 
							
					
				| can_access_public_api() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| validate_env_model() | 
									S  | 
																	80 | 
													1 | 
													3 | 
							
					
				| clean_text() | 
									S  | 
																	66 | 
													1 | 
													8 | 
							
					
				| markdown_to_html() | 
									S  | 
																	73 | 
													1 | 
													5 | 
							
					
				| download_image() | 
									S  | 
																	80 | 
													1 | 
													3 | 
							
					
				| add_image_from_url() | 
									S  | 
																	76 | 
													1 | 
													3 | 
							
					
				| get_nonce() | 
									S  | 
																	80 | 
													1 | 
													3 | 
							
					
				| fix_chat_id() | 
									S  | 
																	79 | 
													1 | 
													3 | 
							
					
				| get_session_id() | 
									S  | 
																	81 | 
													1 | 
													3 | 
							
					
				| get_response_id_manager() | 
									S  | 
																	82 | 
													1 | 
													3 | 
							
					
				| get_message_builder() | 
									S  | 
																	82 | 
													1 | 
													3 | 
							
					
				| get_user_id() | 
									S  | 
																	80 | 
													1 | 
													3 | 
							
					
				| get_session_user_id() | 
									S  | 
																	81 | 
													1 | 
													3 | 
							
					
				| get_admin_user() | 
									S  | 
																	81 | 
													1 | 
													3 | 
							
					
				| get_user_data() | 
									S  | 
																	81 | 
													1 | 
													3 | 
							
					
				| get_ip_address() | 
									S  | 
																	80 | 
													1 | 
													3 | 
							
					
				| check_rest_nonce() | 
									S  | 
																	72 | 
													1 | 
													5 | 
							
					
				| record_tokens_usage() | 
									S  | 
																	78 | 
													1 | 
													3 | 
							
					
				| record_audio_usage() | 
									S  | 
																	79 | 
													1 | 
													3 | 
							
					
				| record_images_usage() | 
									S  | 
																	79 | 
													1 | 
													3 | 
							
					
				| record_videos_usage() | 
									S  | 
																	79 | 
													1 | 
													3 | 
							
					
				| update_themes() | 
									S  | 
																	76 | 
													1 | 
													4 | 
							
					
				| get_embeddings_env() | 
									S  | 
																	80 | 
													1 | 
													3 | 
							
					
				| get_ai_env() | 
									S  | 
																	80 | 
													1 | 
													3 | 
							
					
				| get_assistant() | 
									S  | 
																	79 | 
													1 | 
													3 | 
							
					
				| update_option() | 
									S  | 
																	72 | 
													1 | 
													5 | 
							
					
				| get_option() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| reset_options() | 
									S  | 
																	71 | 
													1 | 
													6 | 
							
					
				| track_cron_start() | 
									S  | 
																	78 | 
													1 | 
													3 |