Skip to content

Commit 3970635

Browse files
authored
Merge pull request #98 from enhay/bugfix/openai_draw_config
fix draw host config
2 parents 6158837 + 1f2099d commit 3970635

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

chat/common/openai/draw.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ type Draw struct {
2424
Proxy string
2525
}
2626

27-
func NewOpenaiDraw(key, proxy string) *Draw {
27+
func NewOpenaiDraw(host, key, proxy string) *Draw {
2828
return &Draw{
29-
Host: "https://api.openai.com",
29+
Host: host,
3030
APIKey: key,
3131
Proxy: proxy,
3232
}

chat/service/chat/api/internal/logic/chatlogic.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ func (p CommendDraw) exec(l *ChatLogic, req *types.ChatReq) bool {
820820
)
821821
} else if l.svcCtx.Config.Draw.Company == draw.OPENAI {
822822
d = openai.NewOpenaiDraw(
823+
l.svcCtx.Config.Draw.OpenAi.Host,
823824
l.svcCtx.Config.Draw.OpenAi.Key,
824825
l.svcCtx.Config.Draw.OpenAi.Proxy,
825826
)

0 commit comments

Comments
 (0)