You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa4ea1c
Browse filesBrowse the repository at this point in the historyBrowse files
Build/Test Tools: Fix the request limit, the model check and the answer of the live AI provider tests.
The number of requests a model may take now follows the number of abilities, so a model that calls one ability per response can still answer when it is given all six.
The model of each result is compared with the requested one, which also catches a listed model that cannot be used for the prompt. Every text part of the answer is read, not only the first one.
See #66707.
* The provider tools and the Connectors read other names, such as `ANTHROPIC_API_KEY`, so a key
12
12
* set for them does not start these tests, and a key set for these tests is not used by a site.
13
13
*
14
-
* A provider uses its default model, unless a `WP_TESTS_AI_{PROVIDER}_MODEL` environment
15
-
* variable, such as `WP_TESTS_AI_GOOGLE_MODEL`, names another one.
14
+
* A provider uses its default model, unless its `WP_TESTS_AI_*_MODEL` environment variable,
15
+
* such as `WP_TESTS_AI_GOOGLE_MODEL`, names another one.
16
16
*
17
17
* @group ai-client
18
18
* @group abilities-api
@@ -48,19 +48,32 @@ class Tests_AI_Client_LiveProviders extends WP_UnitTestCase {
48
48
* For each core ability, a question no other ability answers and the value the answer must contain.
49
49
*/
50
50
privateconstQUESTIONS = array(
51
-
'core/get-site-info' => array( 'What is the character encoding of this site?', 'UTF-8' ),
52
-
'core/get-user-info' => array( 'What is my display name?', 'Barnaby Quillfeather' ),
53
-
'core/get-environment-info' => array( 'Which PHP version does this site run?', PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION . '.' . PHP_RELEASE_VERSION ),
54
-
'core/settings-get' => array( 'What is the timezone setting of this site?', 'Pacific/Chatham' ),
55
-
'core/users-query' => array( 'What is the display name of the user with the username "live_provider_editor"?', 'Marigold Featherstone' ),
56
-
'core/content-query' => array( 'What is the title of the post with the slug "live-provider-post"?', 'Quokka Lighthouse Notes' ),
51
+
'core/get-site-info' => array(
52
+
'question' => 'What is the character encoding of this site?',
53
+
'answer' => 'UTF-8',
54
+
),
55
+
'core/get-user-info' => array(
56
+
'question' => 'What is my display name?',
57
+
'answer' => 'Barnaby Quillfeather',
58
+
),
59
+
'core/get-environment-info' => array(
60
+
'question' => 'Which PHP version does this site run?',
0 commit comments