diff --git a/README.md b/README.md index 00f0291..6d5036c 100644 --- a/README.md +++ b/README.md @@ -198,5 +198,7 @@ The changelog: * Support setup chat AI model for each robot. v1.0.24 * Support setup chat window for each robot. [v1.0.25](https://github.com/ossrs/ai-talk/releases/tag/v1.0.25) * Alert error when not HTTPS. v1.0.26 +* Support HTTPS proxy for OpenAI. v1.0.27 +* Support official OpenAI API without proxy. [v1.0.28](https://github.com/ossrs/ai-talk/releases/tag/v1.0.28) Winlin, 2023.12 diff --git a/backend/main.go b/backend/main.go index 33ae6ec..cec2a25 100644 --- a/backend/main.go +++ b/backend/main.go @@ -1302,7 +1302,7 @@ func doConfig(ctx context.Context) error { if strings.Contains(proxy, "://") { aiConfig.BaseURL = proxy } else if strings.Contains(proxy, "openai.com") { - aiConfig.BaseURL = fmt.Sprintf("http://%v", proxy) + aiConfig.BaseURL = fmt.Sprintf("https://%v", proxy) } else { aiConfig.BaseURL = fmt.Sprintf("http://%v", proxy) }