Add Jamba Support
This commit is contained in:
@@ -96,6 +96,10 @@
|
||||
<TextInput marginBottom={true} size={"sm"} placeholder="..." hideText={$DataBase.hideApiKey} bind:value={$DataBase.google.projectId}/>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if $DataBase.aiModel.startsWith('jamba') || $DataBase.subModel.startsWith('jamba')}
|
||||
<span class="text-textcolor">AI21 {language.apiKey}</span>
|
||||
<TextInput hideText={$DataBase.hideApiKey} marginBottom={true} size={"sm"} placeholder="..." bind:value={$DataBase.ai21Key}/>
|
||||
{/if}
|
||||
{#if $DataBase.aiModel.startsWith('novellist') || $DataBase.subModel.startsWith('novellist')}
|
||||
<span class="text-textcolor">NovelList {language.apiKey}</span>
|
||||
<TextInput hideText={$DataBase.hideApiKey} marginBottom={true} size={"sm"} placeholder="..." bind:value={$DataBase.novellistAPI}/>
|
||||
|
||||
@@ -137,6 +137,10 @@
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('novelai')}}>NovelAI Clio</button>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('novelai_kayra')}}>NovelAI Kayra</button>
|
||||
</Arcodion>
|
||||
<Arcodion name="AI21">
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('jamba-1.5-large')}}>Jamba 1.5 Large</button>
|
||||
<button class="hover:bg-selected px-6 py-2 text-lg" on:click={() => {changeModel('jamba-1.5-medium')}}>Jamba 1.5 Medium</button>
|
||||
</Arcodion>
|
||||
<Arcodion name="Horde">
|
||||
{#await getHordeModels()}
|
||||
<button class="p-2">Loading...</button>
|
||||
|
||||
@@ -238,6 +238,8 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
case 'gpt4o-chatgpt':
|
||||
case 'gpt4o1-preview':
|
||||
case 'gpt4o1-mini':
|
||||
case 'jamba-1.5-large':
|
||||
case 'jamba-1.5-medium':
|
||||
case 'reverse_proxy':{
|
||||
let formatedChat:OpenAIChatExtra[] = []
|
||||
for(let i=0;i<formated.length;i++){
|
||||
@@ -613,6 +615,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
if(risuIdentify){
|
||||
headers["X-Proxy-Risu"] = 'RisuAI'
|
||||
}
|
||||
if(aiModel.startsWith('jamba')){
|
||||
headers['Authorization'] = 'Bearer ' + db.ai21Key
|
||||
replacerURL = 'https://api.ai21.com/studio/v1/chat/completions'
|
||||
}
|
||||
if(multiGen){
|
||||
// @ts-ignore
|
||||
body.n = db.genTime
|
||||
|
||||
@@ -738,6 +738,7 @@ export interface Database{
|
||||
jsonSchema:string
|
||||
strictJsonSchema:boolean
|
||||
extractJson:string
|
||||
ai21Key:string
|
||||
statics: {
|
||||
messages: number
|
||||
imports: number
|
||||
|
||||
Reference in New Issue
Block a user