Migrate to svelte 5
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import { Template } from '@huggingface/jinja';
|
||||
import type { OpenAIChat } from '..';
|
||||
import { get } from 'svelte/store';
|
||||
import { DataBase } from 'src/ts/storage/database';
|
||||
import { CurrentCharacter } from 'src/ts/stores';
|
||||
import { DataBase, getCurrentCharacter } from 'src/ts/storage/database';
|
||||
import { getUserName } from 'src/ts/util';
|
||||
|
||||
export const chatTemplates = {
|
||||
@@ -31,7 +30,7 @@ export const applyChatTemplate = (messages:OpenAIChat[], arg:{
|
||||
custom?: string
|
||||
} = {}) => {
|
||||
const db = get(DataBase)
|
||||
const currentChar = get(CurrentCharacter)
|
||||
const currentChar = getCurrentCharacter()
|
||||
const type = arg.type ?? db.instructChatTemplate
|
||||
if(!type){
|
||||
throw new Error('Template type is not set')
|
||||
|
||||
Reference in New Issue
Block a user