Skip to content
Snippets Groups Projects
Commit 947d8d51 authored by Andrew Belcher's avatar Andrew Belcher
Browse files

Issue #3493877: isUsable should support direct setting of API key.

parent 3b2f8203
No related branches found
No related tags found
1 merge request!6Issue #3493877: isUsable should support direct setting of API key.
Pipeline #369564 passed
......@@ -97,7 +97,7 @@ class OpenAiProvider extends AiProviderClientBase implements
*/
public function isUsable(?string $operation_type = NULL, array $capabilities = []): bool {
// If its not configured, it is not usable.
if (!$this->getConfig()->get('api_key')) {
if (!$this->apiKey && !$this->getConfig()->get('api_key')) {
return FALSE;
}
// If its one of the bundles that OpenAI supports its usable.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment