Adjust novel max context calculation

This commit is contained in:
Cohee
2023-08-10 19:15:52 +03:00
parent f226fe99aa
commit 104d983449
2 changed files with 24 additions and 5 deletions

View File

@@ -41,6 +41,16 @@ const nai_tiers = {
3: 'Opus',
};
let novel_data = null;
export function setNovelData(data) {
novel_data = data;
}
export function getNovelMaxContextTokens() {
return novel_data?.perks?.contextTokens;
}
function getNovelTier(tier) {
return nai_tiers[tier] ?? 'no_connection';
}