File tree Expand file tree Collapse file tree 10 files changed +0
-71
lines changed Expand file tree Collapse file tree 10 files changed +0
-71
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,6 @@ class ComputerVision extends Provider {
33
33
* @param \Classifai\Features\Feature $feature_instance The feature instance.
34
34
*/
35
35
public function __construct ( $ feature_instance = null ) {
36
- parent ::__construct (
37
- 'Microsoft Azure ' ,
38
- 'AI Vision ' ,
39
- 'computer_vision '
40
- );
41
-
42
36
$ this ->feature_instance = $ feature_instance ;
43
37
}
44
38
Original file line number Diff line number Diff line change @@ -37,12 +37,6 @@ class Personalizer extends Provider {
37
37
* @param \Classifai\Features\Feature $feature_instance The feature instance.
38
38
*/
39
39
public function __construct ( $ feature_instance = null ) {
40
- parent ::__construct (
41
- 'Microsoft Azure ' ,
42
- 'AI Personalizer ' ,
43
- 'personalizer '
44
- );
45
-
46
40
$ this ->feature_instance = $ feature_instance ;
47
41
48
42
add_action ( 'rest_api_init ' , [ $ this , 'register_endpoints ' ] );
Original file line number Diff line number Diff line change @@ -44,12 +44,6 @@ class Speech extends Provider {
44
44
* @param \Classifai\Features\Feature $feature_instance The feature instance.
45
45
*/
46
46
public function __construct ( $ feature_instance = null ) {
47
- parent ::__construct (
48
- 'Microsoft Azure ' ,
49
- self ::FEATURE_NAME ,
50
- 'azure_text_to_speech '
51
- );
52
-
53
47
$ this ->feature_instance = $ feature_instance ;
54
48
55
49
do_action ( 'classifai_ ' . static ::ID . '_init ' , $ this );
Original file line number Diff line number Diff line change @@ -46,12 +46,6 @@ class ChatGPT extends Provider {
46
46
* @param \Classifai\Features\Feature $feature_instance The feature instance.
47
47
*/
48
48
public function __construct ( $ feature_instance = null ) {
49
- parent ::__construct (
50
- 'OpenAI ChatGPT ' ,
51
- 'ChatGPT ' ,
52
- 'openai_chatgpt '
53
- );
54
-
55
49
$ this ->feature_instance = $ feature_instance ;
56
50
}
57
51
Original file line number Diff line number Diff line change @@ -37,12 +37,6 @@ class DallE extends Provider {
37
37
* @param \Classifai\Features\Feature $feature_instance The feature instance.
38
38
*/
39
39
public function __construct ( $ feature_instance = null ) {
40
- parent ::__construct (
41
- 'OpenAI ' ,
42
- 'DALL·E ' ,
43
- 'openai_dalle '
44
- );
45
-
46
40
$ this ->feature_instance = $ feature_instance ;
47
41
}
48
42
Original file line number Diff line number Diff line change @@ -48,13 +48,6 @@ class Embeddings extends Provider {
48
48
* @param \Classifai\Features\Feature $feature_instance The feature instance.
49
49
*/
50
50
public function __construct ( $ feature_instance = null ) {
51
- parent ::__construct (
52
- 'OpenAI Embeddings ' ,
53
- 'Embeddings ' ,
54
- 'openai_embeddings ' ,
55
- $ feature_instance
56
- );
57
-
58
51
$ this ->feature_instance = $ feature_instance ;
59
52
}
60
53
Original file line number Diff line number Diff line change @@ -62,12 +62,6 @@ class Whisper extends Provider {
62
62
* @param \Classifai\Features\Feature $feature_instance The feature instance.
63
63
*/
64
64
public function __construct ( $ feature_instance = null ) {
65
- parent ::__construct (
66
- 'OpenAI Whisper ' ,
67
- 'Whisper ' ,
68
- 'openai_whisper '
69
- );
70
-
71
65
$ this ->feature_instance = $ feature_instance ;
72
66
}
73
67
Original file line number Diff line number Diff line change @@ -36,18 +36,6 @@ abstract class Provider {
36
36
*/
37
37
protected $ features = array ();
38
38
39
- /**
40
- * Provider constructor.
41
- *
42
- * @param string $provider_name The name of the Provider that will appear in the admin tab
43
- * @param string $provider_service_name The name of the Service.
44
- * @param string $option_name Name of the option where the provider settings are stored.
45
- */
46
- public function __construct ( string $ provider_name , string $ provider_service_name , string $ option_name ) {
47
- $ this ->provider_name = $ provider_name ;
48
- $ this ->provider_service_name = $ provider_service_name ;
49
- $ this ->option_name = $ option_name ;
50
- }
51
39
52
40
/**
53
41
* Provides the provider name.
@@ -58,15 +46,6 @@ public function get_provider_name(): string {
58
46
return $ this ->provider_name ;
59
47
}
60
48
61
- /**
62
- * Returns the name of the settings section for this provider.
63
- *
64
- * @return string
65
- */
66
- public function get_settings_section (): string {
67
- return $ this ->option_name ;
68
- }
69
-
70
49
/**
71
50
* Get provider features.
72
51
*
Original file line number Diff line number Diff line change @@ -42,12 +42,6 @@ class NLU extends Provider {
42
42
* @param \Classifai\Features\Feature $feature Feature instance (Optional, only required in admin).
43
43
*/
44
44
public function __construct ( $ feature = null ) {
45
- parent ::__construct (
46
- 'IBM Watson ' ,
47
- 'Natural Language Understanding ' ,
48
- 'watson_nlu '
49
- );
50
-
51
45
$ this ->nlu_features = [
52
46
'category ' => [
53
47
'feature ' => __ ( 'Category ' , 'classifai ' ),
Original file line number Diff line number Diff line change @@ -135,7 +135,6 @@ public function get_display_name(): string {
135
135
* Render the start of a settings page. The rest is added by the providers
136
136
*/
137
137
public function render_settings_page () {
138
- $ active_tab = $ this ->provider_classes ? $ this ->provider_classes [0 ]->get_settings_section () : '' ;
139
138
$ active_tab = isset ( $ _GET ['provider ' ] ) ? sanitize_text_field ( wp_unslash ( $ _GET ['provider ' ] ) ) : $ active_tab ; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
140
139
$ base_url = add_query_arg (
141
140
array (
You can’t perform that action at this time.
0 commit comments