This commit is contained in:
Webifi 2023-05-28 20:38:25 -05:00
parent 8297041059
commit ac5f8ae6e5
2 changed files with 2 additions and 2 deletions

View File

@ -162,7 +162,7 @@
const promptTokenCount:number = filtered.reduce((a, m) => {
// Not sure how OpenAI formats it, but this seems to get close to the right counts
// Sure would be nice to know
a += encode('## ' + m.role + " ##:\r\n\r\n" + m.content + "\r\n\r\n\r\n").length
a += encode('## ' + m.role + ' ##:\r\n\r\n' + m.content + '\r\n\r\n\r\n').length
return a
}, 0) + 3

View File

@ -1,7 +1,7 @@
<script context="module" lang="ts">
import { getChatDefaults, getExcludeFromProfile } from './Settings.svelte'
// Profile definitions
import { addMessage, clearMessages, getChat, getChatSettings, getCustomProfiles, getGlobalSettings, resetChatSettings, saveChatStore, setChatSettingValueByKey, setGlobalSettingValueByKey } from './Storage.svelte'
import { addMessage, clearMessages, getChat, getChatSettings, getCustomProfiles, getGlobalSettings, resetChatSettings, saveChatStore, setGlobalSettingValueByKey } from './Storage.svelte'
import type { Message, SelectOption, ChatSettings } from './Types.svelte'
import { v4 as uuidv4 } from 'uuid'