[feat] gpt35 instruct supamemory

This commit is contained in:
kwaroran
2023-09-23 16:36:29 +09:00
parent 36ee51903e
commit b733238272
2 changed files with 5 additions and 2 deletions

View File

@@ -77,11 +77,12 @@
<SelectInput className="mt-2 mb-2" bind:value={$DataBase.supaMemoryType}>
<OptionInput value="none" >None</OptionInput>
<OptionInput value="distilbart" >distilbart-cnn-6-6 (Free/Local)</OptionInput>
<OptionInput value="instruct35" >OpenAI 3.5 Turbo Instruct</OptionInput>
<OptionInput value="davinci" >OpenAI Davinci</OptionInput>
<OptionInput value="curie" >OpenAI Curie</OptionInput>
<OptionInput value="subModel" >{language.submodel} ({language.unrecommended})</OptionInput>
</SelectInput>
{#if $DataBase.supaMemoryType === 'davinci' || $DataBase.supaMemoryType === 'curie'}
{#if $DataBase.supaMemoryType === 'davinci' || $DataBase.supaMemoryType === 'curie' || $DataBase.supaMemoryType === 'instruct35'}
<span class="text-textcolor">{language.SuperMemory} OpenAI Key</span>
<TextInput size="sm" marginBottom bind:value={$DataBase.supaMemoryKey}/>
{/if}

View File

@@ -206,7 +206,9 @@ export async function supaMemory(
},
method: "POST",
body: {
"model": db.supaMemoryType === 'curie' ? "text-curie-001" : "text-davinci-003",
"model": db.supaMemoryType === 'curie' ? "text-curie-001"
: db.supaMemoryType === 'instruct35' ? 'gpt-3.5-turbo-instruct'
: "text-davinci-003",
"prompt": promptbody,
"max_tokens": 600,
"temperature": 0