[feat] hypamemory settings

This commit is contained in:
kwaroran
2023-08-06 19:10:19 +09:00
parent 936c8f2dab
commit 0408125f1b
4 changed files with 13 additions and 4 deletions

View File

@@ -411,4 +411,5 @@ export const languageEnglish = {
promptTemplate: "Prompt Template",
customInnerFormat: "Custom Inner Format",
innerFormat: "Inner Format",
HypaMemory: "HypaMemory",
}

View File

@@ -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}

View File

@@ -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)

View File

@@ -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{