From 8351543f626da65a99fcbef6c55054e2379e3bfc Mon Sep 17 00:00:00 2001 From: tkisme Date: Fri, 17 May 2024 15:17:43 +0800 Subject: [PATCH] fallback model --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index e6f845a..ee90d77 100644 --- a/main.go +++ b/main.go @@ -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