diff --git a/api/chat_model_handler.go b/api/chat_model_handler.go index d17294a0..150a95b1 100644 --- a/api/chat_model_handler.go +++ b/api/chat_model_handler.go @@ -205,10 +205,6 @@ func (h *ChatModelHandler) DeleteChatModel(w http.ResponseWriter, r *http.Reques func (h *ChatModelHandler) GetDefaultChatModel(w http.ResponseWriter, r *http.Request) { ChatModel, err := h.db.GetDefaultChatModel(r.Context()) - // default 512 is for history reasaon, now most model support 4096 and token is cheap - if ChatModel.MaxToken == 512 { - ChatModel.MaxToken = 4096 - } if err != nil { w.WriteHeader(http.StatusInternalServerError) w.Write([]byte(fmt.Sprintf("Error retrieving default chat API: %s", err.Error()))) diff --git a/api/sqlc/schema.sql b/api/sqlc/schema.sql index f1da9c92..a00d9610 100644 --- a/api/sqlc/schema.sql +++ b/api/sqlc/schema.sql @@ -121,7 +121,7 @@ CREATE TABLE IF NOT EXISTS chat_session ( max_length integer DEFAULT 0 NOT NULL, temperature float DEFAULT 1.0 NOT NUll, top_p float DEFAULT 1.0 NOT NUll, - max_tokens int DEFAULT 512 NOT NULL, + max_tokens int DEFAULT 4096 NOT NULL, n integer DEFAULT 1 NOT NULL, summarize_mode boolean DEFAULT false NOT NULL ); @@ -130,7 +130,7 @@ CREATE TABLE IF NOT EXISTS chat_session ( -- chat_session ALTER TABLE chat_session ADD COLUMN IF NOT EXISTS temperature float DEFAULT 1.0 NOT NULL; ALTER TABLE chat_session ADD COLUMN IF NOT EXISTS top_p float DEFAULT 1.0 NOT NULL; -ALTER TABLE chat_session ADD COLUMN IF NOT EXISTS max_tokens int DEFAULT 512 NOT NULL; +ALTER TABLE chat_session ADD COLUMN IF NOT EXISTS max_tokens int DEFAULT 4096 NOT NULL; ALTER TABLE chat_session ADD COLUMN IF NOT EXISTS debug boolean DEFAULT false NOT NULL; ALTER TABlE chat_session ADD COLUMN IF NOT EXISTS model character varying(255) NOT NULL DEFAULT 'gpt-3.5-turbo'; ALTER TABLE chat_session ADD COLUMN IF NOT EXISTS n INTEGER DEFAULT 1 NOT NULL;