Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Refactor Summarize Logic
Browse files Browse the repository at this point in the history
[+] refactor(chat.ts): simplify getSummarizeModel function

Note : Previously it was only gpt, now any custom models/ai
  • Loading branch information
H0llyW00dzZ committed Nov 14, 2023
1 parent a41e4dd commit f7f2793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function createEmptySession(): ChatSession {
// fix known issue where summarize is not using the current model selected
function getSummarizeModel(currentModel: string, modelConfig: ModelConfig) {
// should be depends of user selected
return currentModel.startsWith("gpt") ? modelConfig.model : currentModel;
return currentModel ? modelConfig.model : currentModel;
}

function countMessages(msgs: ChatMessage[]) {
Expand Down

0 comments on commit f7f2793

Please sign in to comment.