Remove unused Plugin button from ModelList and update model parameters for Gemini Exp 1206; adjust URL generation logic in request functions.
This commit is contained in:
@@ -72,9 +72,6 @@
|
|||||||
{/each}
|
{/each}
|
||||||
{/await}
|
{/await}
|
||||||
</Arcodion>
|
</Arcodion>
|
||||||
{#if DBState.db.plugins.length > 0}
|
|
||||||
<button onclick={() => {changeModel('custom')}} class="hover:bg-selected px-6 py-2 text-lg" >Plugin</button>
|
|
||||||
{/if}
|
|
||||||
<div class="text-textcolor2 text-xs">
|
<div class="text-textcolor2 text-xs">
|
||||||
<CheckInput name={language.showUnrecommended} grayText bind:check={showUnrec}/>
|
<CheckInput name={language.showUnrecommended} grayText bind:check={showUnrec}/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -695,6 +695,14 @@ export const LLMModels: LLMModel[] = [
|
|||||||
provider: LLMProvider.GoogleCloud,
|
provider: LLMProvider.GoogleCloud,
|
||||||
format: LLMFormat.GoogleCloud,
|
format: LLMFormat.GoogleCloud,
|
||||||
flags: [LLMFlags.hasImageInput, LLMFlags.hasFirstSystemPrompt],
|
flags: [LLMFlags.hasImageInput, LLMFlags.hasFirstSystemPrompt],
|
||||||
|
parameters: ['temperature', 'top_k', 'top_p']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Gemini Exp 1206",
|
||||||
|
id: 'gemini-exp-1206',
|
||||||
|
provider: LLMProvider.GoogleCloud,
|
||||||
|
format: LLMFormat.GoogleCloud,
|
||||||
|
flags: [LLMFlags.hasImageInput, LLMFlags.hasFirstSystemPrompt],
|
||||||
recommended: true,
|
recommended: true,
|
||||||
parameters: ['temperature', 'top_k', 'top_p']
|
parameters: ['temperature', 'top_k', 'top_p']
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export function getGenerationModelString(){
|
|||||||
const db = getDatabase()
|
const db = getDatabase()
|
||||||
switch (db.aiModel){
|
switch (db.aiModel){
|
||||||
case 'reverse_proxy':
|
case 'reverse_proxy':
|
||||||
return 'reverse_proxy-' + (db.reverseProxyOobaMode ? 'ooba' : db.proxyRequestModel)
|
return 'custom-' + (db.reverseProxyOobaMode ? 'ooba' : db.customProxyRequestModel)
|
||||||
case 'openrouter':
|
case 'openrouter':
|
||||||
return 'openrouter-' + db.openrouterRequestModel
|
return 'openrouter-' + db.openrouterRequestModel
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1580,7 +1580,7 @@ async function requestGoogleCloudVertex(arg:RequestDataArgumentExtended):Promise
|
|||||||
|
|
||||||
const url = arg.customURL ?? (arg.modelInfo.format === LLMFormat.VertexAIGemini ?
|
const url = arg.customURL ?? (arg.modelInfo.format === LLMFormat.VertexAIGemini ?
|
||||||
`https://${REGION}-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/us-central1/publishers/google/models/${arg.modelInfo.internalID}:streamGenerateContent`
|
`https://${REGION}-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/us-central1/publishers/google/models/${arg.modelInfo.internalID}:streamGenerateContent`
|
||||||
: `https://generativelanguage.googleapis.com/v1beta/models/${arg.modelInfo.internalID}:generateContent?key=${db.google.accessToken}`)
|
: `https://generativelanguage.googleapis.com/v1beta/models/${arg.modelInfo.internalID}:generateContent?key=${(arg.aiModel === 'reverse_proxy') ? db.proxyKey : db.google.accessToken}`)
|
||||||
const res = await globalFetch(url, {
|
const res = await globalFetch(url, {
|
||||||
headers: headers,
|
headers: headers,
|
||||||
body: body,
|
body: body,
|
||||||
@@ -2533,7 +2533,7 @@ async function requestWebLLM(arg:RequestDataArgumentExtended):Promise<requestDat
|
|||||||
top_p: db.ooba.top_p,
|
top_p: db.ooba.top_p,
|
||||||
repetition_penalty: db.ooba.repetition_penalty,
|
repetition_penalty: db.ooba.repetition_penalty,
|
||||||
typical_p: db.ooba.typical_p,
|
typical_p: db.ooba.typical_p,
|
||||||
})
|
} as any)
|
||||||
return {
|
return {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
result: unstringlizeChat(v.generated_text as string, formated, currentChar?.name ?? '')
|
result: unstringlizeChat(v.generated_text as string, formated, currentChar?.name ?? '')
|
||||||
|
|||||||
Reference in New Issue
Block a user