laravel icon indicating copy to clipboard operation
laravel copied to clipboard

Can we customize `OPENAI_BASE_URL`, just like we defined `OPENAI_API_KEY`?

Open chudaozhe opened this issue 1 year ago • 1 comments

cat .env

OPENAI_API_KEY=sk-rxxxx
OPENAI_ORGANIZATION=
OPENAI_REQUEST_TIMEOUT=30
OPENAI_BASE_URL=api.openai.com/v1

chudaozhe avatar Jun 04 '24 15:06 chudaozhe

it would be great like that a local lm can be used

acidlake avatar Jun 05 '24 21:06 acidlake

It would be great to have a way to do this more conveniently.

Currently need to use the factory method on the underlying PHP client https://github.com/openai-php/client?tab=readme-ov-file#services

MichaelCrowcroft avatar Nov 14 '24 17:11 MichaelCrowcroft

I've opened a PR to allow an env configuration for base url - https://github.com/openai-php/laravel/pull/144

iBotPeaches avatar Apr 07 '25 16:04 iBotPeaches