pilotmoon / PopClip-Extensions

Source code for extensions in the official PopClip Extensions directory.
https://www.popclip.app/extensions/
MIT License
1.92k stars 440 forks source link

Add API domain option #1245

Closed chentao1006 closed 5 months ago

chentao1006 commented 5 months ago

Add option to specify API base domain and update API request URL. Allow user to change the default OpenAI API to customized domain.

pilotmoon commented 5 months ago

Thanks @chentao1006 , this looks good. I'm not familiar with the use of alternative domains for the OpenAI API. To help me understand the change, can you describe when alternate domains might typically be used? Fill me in on the typical use case.

chentao1006 commented 5 months ago

Custom domains for the OpenAI API are used in various scenarios. One common use case is when users want to build their own OpenAI API infrastructure, including setting up reverse proxies or integrating different large models. By using custom domains, users can customize and manage the API requests based on their specific requirements.

Additionally, some users may need to integrate multiple OpenAI accounts or different models. With custom domains, they can assign different domains to each model or account, facilitating better management and differentiation.

pilotmoon commented 5 months ago

Awesome. All makes sense. Thanks!

chentao1006 commented 5 months ago

Thank you!

pilotmoon commented 5 months ago

Update published to: https://www.popclip.app/extensions/x/48f32j