fix: remove validation which could prevent selfhosting w ollama

This commit is contained in:
hackerESQ
2024-12-06 16:09:03 -06:00
parent cb9199431a
commit 5b8e4c634e
@@ -202,10 +202,6 @@ new class extends Component {
$organization = config('openai.organization'); $organization = config('openai.organization');
$baseUri = config('openai.base_uri'); $baseUri = config('openai.base_uri');
if (! is_string($apiKey) || ($organization !== null && ! is_string($organization))) {
throw new \InvalidArgumentException('The OpenAI API Key is missing. Please publish the [openai.php] configuration file and set the [api_key].');
}
return OpenAI::factory() return OpenAI::factory()
->withApiKey($apiKey) ->withApiKey($apiKey)
->withOrganization($organization) ->withOrganization($organization)