fallback model

This commit is contained in:
tkisme 2024-05-17 15:17:43 +08:00
parent ddbe908873
commit 8351543f62
1 changed files with 3 additions and 0 deletions

View File

@ -221,6 +221,9 @@ func (s *ProxyService) codeCompletions(c *gin.Context) {
body, _ = sjson.DeleteBytes(body, "extra")
body, _ = sjson.DeleteBytes(body, "nwo")
if s.cfg.CodexModelDefault == "" {
s.cfg.CodexModelDefault = "gpt-3.5-turbo-instruct"
}
body, _ = sjson.SetBytes(body, "model", s.cfg.CodexModelDefault)
proxyUrl := s.cfg.CodexApiBase