tisfeng / Raycast-Easydict

A Raycast Extension for looking up words or translating text in an easy way. Support 48+ languages, support Linguee and Youdao dictionary, support OpenAI, DeepL, Google, Bing, Apple, Baidu, Tencent, Volcano, Youdao and Caiyun translation.
https://www.raycast.com/isfeng/easydict
MIT License
382 stars 21 forks source link

fix: support http protocol for custom OpenAI api url #51

Closed rookiezn closed 6 months ago

rookiezn commented 6 months ago

Users might want to deploy OpenAI API service locally, in which case the HTTP protocol is usually used. But currently setting the http url will cause an error when calling the api. TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"

This PR aims to fix this issue.

tisfeng commented 6 months ago

Thank you for your PR, I have just added the custom model option, we can use ollama for translation now.

image
tisfeng commented 6 months ago

If there are no issues, I'll submit a version update to the store later.

rookiezn commented 6 months ago

That would be great