feat: update according to openai doc

This commit is contained in:
Yiyang Kang 2025-02-02 15:28:16 +09:00
parent 2ff8372439
commit 4ab359053a
4 changed files with 30 additions and 18 deletions

View file

@ -20,7 +20,7 @@ func NewClient(apiKey string) *Client {
cli := resty.New().
SetTransport(&http.Transport{
Proxy: http.ProxyFromEnvironment,
ResponseHeaderTimeout: 10 * time.Second,
ResponseHeaderTimeout: 90 * time.Second,
}).
SetBaseURL("https://api.openai.com").
SetHeader("Authorization", "Bearer "+apiKey).