Skip to content

Commit

Permalink
Support official OpenAI API without proxy. v1.0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 15, 2023
1 parent 6e075e9 commit 6f81e36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6f81e36

Please sign in to comment.