#30 Add method to create client with custom base URI
This solves #30. Please also see my comment here https://github.com/openai-php/client/issues/30#issuecomment-1367486440
BaseUri::toString will now check, if the given base URI starts with a protocol. If not, it adds https:// as protocol as prefix to the URI.
Also, the method will now check, if the given base URI ends with a slash and only append a trailing slash to it, if not.
That can be used, so users can create clients with a custom base URI, that is not required to use https as protocol, e.g.
$client = OpenAI::clientWithBaseUri('sk-...', 'http://mock-api/v1');
Hi, I don't want to be impatient, but do you need any more information from me? It's also fine, if you have doubts about this changes, would be just good to know :)
An extended factory has been added in v0.4.0.
@LeoVie Thank you very much for your help and patience.