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