Skip to content

Commit

Permalink
Merge pull request #37 from investbrainapp/feat-use-openai-compatible…
Browse files Browse the repository at this point in the history
…-endpoints

Feat use openai compatible endpoints
  • Loading branch information
hackeresq authored Dec 6, 2024
2 parents 70c3f71 + 6f72a03 commit 3f9a1ba
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions resources/views/livewire/ai-chat-window.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Models\Holding;
use Illuminate\Database\Eloquent\Model;
use Livewire\Volt\Component;
use OpenAI;
use OpenAI\Factory;
use OpenAI\Responses\StreamResponse;
new class extends Component {
Expand Down Expand Up @@ -202,10 +202,6 @@ private function createOpenAiClient()
$organization = config('openai.organization');
$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()
->withApiKey($apiKey)
->withOrganization($organization)
Expand Down

0 comments on commit 3f9a1ba

Please sign in to comment.