Skip to content

Add Base Uri to Config #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Add Base Uri to Config #55

wants to merge 1 commit into from

Conversation

cao-minh-duc
Copy link

@cao-minh-duc cao-minh-duc commented Jul 19, 2023

Sometime we need to change Base Uri also. Example: https://learn.microsoft.com/en-us/azure/ai-services/openai/reference


if (! is_string($apiKey) || ($organization !== null && ! is_string($organization))) {
if (! is_string($apiKey) || ! is_string($baseUri) || ($organization !== null && ! is_string($organization))) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a exception for all cases? Maybe we can reconsider this..

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Without this condition ! is_string($baseUri) it cannot pass phpstan. Do you have better solution?

Copy link

@haydar haydar Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean remove !is_string condition. Instead of this, you can use different if block and exception for baseUrl

@gehrisandro
Copy link
Collaborator

Closing in favour of #72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants