init.php
109 lines
| 1 | <?php |
| 2 | |
| 3 | require_once( MWAI_PATH . '/constants/models.php' ); |
| 4 | |
| 5 | define( 'MWAI_CHATBOT_PARAMS', [ |
| 6 | // UI Parameters |
| 7 | 'id' => '', |
| 8 | 'env' => 'chatbot', |
| 9 | 'mode' => 'chat', |
| 10 | 'context' => "Converse as if you were an AI assistant. Be friendly, creative.", |
| 11 | 'ai_name' => "AI: ", |
| 12 | 'user_name' => "User: ", |
| 13 | 'guest_name' => "Guest: ", |
| 14 | 'sys_name' => "System: ", |
| 15 | 'start_sentence' => "Hi! How can I help you?", |
| 16 | 'text_send' => 'Send', |
| 17 | 'text_clear' => 'Clear', |
| 18 | 'text_input_placeholder' => 'Type your message...', |
| 19 | 'text_compliance' => '', |
| 20 | 'max_sentences' => 15, |
| 21 | 'style' => 'chatgpt', |
| 22 | 'window' => false, |
| 23 | 'icon_text' => '', |
| 24 | 'icon_position' => 'bottom-right', |
| 25 | 'fullscreen' => false, |
| 26 | // Chatbot System Parameters |
| 27 | 'casually_fine_tuned' => false, |
| 28 | 'content_aware' => false, |
| 29 | 'prompt_ending' => null, |
| 30 | 'completion_ending' => null, |
| 31 | // AI Parameters |
| 32 | 'model' => 'gpt-3.5-turbo', |
| 33 | 'temperature' => 0.8, |
| 34 | 'max_tokens' => 1024, |
| 35 | 'max_results' => 3, |
| 36 | 'api_key' => null |
| 37 | ] ); |
| 38 | |
| 39 | define( 'MWAI_LANGUAGES', [ |
| 40 | 'en' => 'English', |
| 41 | 'de' => 'German', |
| 42 | 'fr' => 'French', |
| 43 | 'es' => 'Spanish', |
| 44 | 'it' => 'Italian', |
| 45 | 'zh' => 'Chinese', |
| 46 | 'ja' => 'Japanese', |
| 47 | 'pt' => 'Portuguese', |
| 48 | //'ru' => 'Russian', |
| 49 | ] ); |
| 50 | |
| 51 | define ( 'MWAI_LIMITS', [ |
| 52 | 'enabled' => true, |
| 53 | 'guests' => [ |
| 54 | 'credits' => 3, |
| 55 | 'creditType' => 'queries', |
| 56 | 'timeFrame' => 'day', |
| 57 | 'isAbsolute' => false, |
| 58 | 'overLimitMessage' => "You have reached the limit.", |
| 59 | ], |
| 60 | 'users' => [ |
| 61 | 'credits' => 10, |
| 62 | 'creditType' => 'price', |
| 63 | 'timeFrame' => 'month', |
| 64 | 'isAbsolute' => false, |
| 65 | 'overLimitMessage' => "You have reached the limit.", |
| 66 | 'ignoredUsers' => "administrator,editor", |
| 67 | ], |
| 68 | ] ); |
| 69 | |
| 70 | define( 'MWAI_OPTIONS', [ |
| 71 | 'module_titles' => true, |
| 72 | 'module_excerpts' => true, |
| 73 | 'module_woocommerce' => true, |
| 74 | 'module_forms' => false, |
| 75 | 'module_blocks' => false, |
| 76 | 'module_playground' => true, |
| 77 | 'module_generator_content' => true, |
| 78 | 'module_generator_images' => true, |
| 79 | 'module_moderation' => false, |
| 80 | 'module_statistics' => false, |
| 81 | 'module_embeddings' => false, |
| 82 | 'module_audio' => false, |
| 83 | 'shortcode_chat' => true, |
| 84 | 'shortcode_chat_params' => MWAI_CHATBOT_PARAMS, |
| 85 | 'shortcode_chat_params_override' => false, |
| 86 | 'shortcode_chat_html' => true, |
| 87 | 'shortcode_chat_formatting' => true, |
| 88 | 'shortcode_chat_typewriter' => false, |
| 89 | 'shortcode_chat_syntax_highlighting' => false, |
| 90 | 'shortcode_chat_logs' => '', // 'file', 'db', 'file,db' |
| 91 | 'shortcode_chat_inject' => false, |
| 92 | 'shortcode_chat_styles' => [], |
| 93 | 'limits' => MWAI_LIMITS, |
| 94 | 'openai_apikey' => false, |
| 95 | 'openai_usage' => [], |
| 96 | 'openai_models' => MWAI_OPENAI_MODELS, |
| 97 | 'openai_finetunes' => [], |
| 98 | 'openai_finetunes_deleted' => [], |
| 99 | 'pinecone' => [ |
| 100 | 'apikey' => false, |
| 101 | 'server' => 'us-east1-gcp', |
| 102 | 'indexes' => [], |
| 103 | 'index' => null |
| 104 | ], |
| 105 | 'extra_models' => "", |
| 106 | 'debug_mode' => true, |
| 107 | 'resolve_shortcodes' => false, |
| 108 | 'languages' => MWAI_LANGUAGES |
| 109 | ]); |