openai-php / laravel

⚡️ OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with OpenAI API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fluent method to specify API key (multi tenancy)

binaryfire opened this issue · comments

Hi guys

Is there a clean way to use multiple api keys with this package? Use case is a multi-tenant app where users supply their own keys

Overriding config values feels a bit hacky and doesn’t always work well with Octane.

Can always just use the underlying client https://github.com/openai-php/client

True. I’ll do that 👍

commented

I'd rather rely on this package's default configuration than copy/pasting it into my Laravel app.

Is there any way to access the client object to call the withApiKey method?