[feat] hypamemory settings
This commit is contained in:
@@ -411,4 +411,5 @@ export const languageEnglish = {
|
||||
promptTemplate: "Prompt Template",
|
||||
customInnerFormat: "Custom Inner Format",
|
||||
innerFormat: "Inner Format",
|
||||
HypaMemory: "HypaMemory",
|
||||
}
|
||||
@@ -80,8 +80,15 @@
|
||||
<span class="text-textcolor">{language.SuperMemory} Prompt</span>
|
||||
<TextInput size="sm" marginBottom bind:value={$DataBase.supaMemoryPrompt} placeholder="recommended to leave it blank to use default"/>
|
||||
{/if}
|
||||
{#if ($DataBase.supaMemoryType === 'davinci' || $DataBase.supaMemoryType === 'curie') && $DataBase.useExperimental}
|
||||
{#if $DataBase.hypaMemory}
|
||||
<span class="text-textcolor">{language.HypaMemory} Model</span>
|
||||
<SelectInput className="mt-2 mb-2" bind:value={$DataBase.hypaModel}>
|
||||
<OptionInput value="MiniLM" >MiniLM-L6-v2 (Free / Local)</OptionInput>
|
||||
<OptionInput value="ada" >OpenAI Ada (Davinci / Curie Only)</OptionInput>
|
||||
</SelectInput>
|
||||
{/if}
|
||||
{#if $DataBase.useExperimental}
|
||||
<div class="flex">
|
||||
<Check bind:check={$DataBase.hypaMemory} name='Able HypaMemory'/> <Help key="experimental" />
|
||||
<Check bind:check={$DataBase.hypaMemory} name={language.able + ' ' + language.HypaMemory}/> <Help key="experimental" />
|
||||
</div>
|
||||
{/if}
|
||||
@@ -202,7 +202,7 @@ export async function supaMemory(
|
||||
let hypaResult = ""
|
||||
|
||||
if(arg.asHyper){
|
||||
const hypa = new HypaProcesser('MiniLM')
|
||||
const hypa = new HypaProcesser(db.hypaModel)
|
||||
hypa.oaikey = db.supaMemoryKey
|
||||
hypa.vectors = []
|
||||
hypaChunks = hypaChunks.filter((value) => value.length > 1)
|
||||
|
||||
@@ -302,7 +302,7 @@ export function setDatabase(data:Database){
|
||||
data.colorScheme ??= cloneDeep(defaultColorScheme)
|
||||
data.colorSchemeName ??= 'default'
|
||||
data.NAIsettings.starter ??= ""
|
||||
|
||||
data.hypaModel ??= 'MiniLM'
|
||||
|
||||
changeLanguage(data.language)
|
||||
DataBase.set(data)
|
||||
@@ -620,6 +620,7 @@ export interface Database{
|
||||
colorSchemeName:string
|
||||
promptTemplate?:Proompt[]
|
||||
forceProxyAsOpenAI?:boolean
|
||||
hypaModel:'ada'|'MiniLM'
|
||||
}
|
||||
|
||||
interface hordeConfig{
|
||||
|
||||
Reference in New Issue
Block a user