MacPaw / OpenAI

Swift community driven package for OpenAI public API
MIT License
2.11k stars 353 forks source link

add scheme, host, and port for buildURL #180

Closed JavadFaghih closed 8 months ago

JavadFaghih commented 8 months ago

What

add scheme, host, and port for buildURL

Why

for comuincate with local backend server

Affected Areas

building url for request

tisfeng commented 8 months ago

Can anyone take a look at this PR?

thekoc commented 8 months ago

It's such a quality of life improvement and has been mentioned multiple times:

https://github.com/MacPaw/OpenAI/issues/179 https://github.com/MacPaw/OpenAI/issues/68 https://github.com/MacPaw/OpenAI/issues/74 https://github.com/MacPaw/OpenAI/issues/61

Not to mention it is supported by the official python library:

# all client options can be configured just like the `OpenAI` instantiation counterpart
openai.base_url = "https://..."
openai.default_headers = {"x-foo": "true"}

Could any one check it out?

@ingvarus-bc

Krivoblotsky commented 8 months ago

Thanks, We will include this change in the next release.

sonarcloud[bot] commented 8 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

ingvarus-bc commented 8 months ago

Hey! 👋 Thanks a lot for your contribution! 🔥