Skip to content

Commit

Permalink
⚙️chore(dependencies) Add alias for OpenAI client interface
Browse files Browse the repository at this point in the history
  • Loading branch information
huangdijia committed May 5, 2023
1 parent 3efdbf5 commit 19d6d1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace FriendsOfHyperf\OpenAi;

use OpenAI\Client;
use OpenAI\Contracts\ClientContract;

final class ConfigProvider
{
Expand All @@ -21,6 +22,7 @@ public function __invoke()
return [
'dependencies' => [
Client::class => ClientFactory::class,
ClientContract::class => fn ($container) => $container->get(Client::class), // alias for Client::class
],
'publish' => [
[
Expand Down

0 comments on commit 19d6d1f

Please sign in to comment.