feat: update menu icons, add version in site titles

This commit is contained in:
RockYang
2024-04-01 18:20:00 +08:00
parent 95efbd5659
commit fbb216fe3b
19 changed files with 67 additions and 28 deletions

View File

@@ -478,7 +478,7 @@ func (h *ChatHandler) doRequest(ctx context.Context, req types.ApiRequest, platf
request = request.WithContext(ctx)
request.Header.Set("Content-Type", "application/json")
var proxyURL string
if apiKey.ProxyURL != "" { // 使用代理
if len(apiKey.ProxyURL) > 5 { // 使用代理
proxy, _ := url.Parse(apiKey.ProxyURL)
client = &http.Client{
Transport: &http.Transport{

View File

@@ -220,7 +220,7 @@ func (h *FunctionHandler) Dall3(c *gin.Context) {
var res imgRes
var errRes ErrRes
var request *req.Request
if apiKey.ProxyURL != "" {
if len(apiKey.ProxyURL) > 5 {
request = req.C().SetProxyURL(apiKey.ProxyURL).R()
} else {
request = req.C().R()

View File

@@ -61,7 +61,7 @@ func OpenAIRequest(db *gorm.DB, prompt string) (string, error) {
var response apiRes
var errRes apiErrRes
client := req.C()
if apiKey.ProxyURL != "" {
if len(apiKey.ProxyURL) > 5 {
client.SetProxyURL(apiKey.ApiURL)
}
r, err := client.R().SetHeader("Content-Type", "application/json").