2 Commits

Author SHA1 Message Date
IndieKKY
1f1d48b56a chore: release 1.10.2 2024-07-23 10:01:09 +08:00
IndieKKY
02b7a09f42 更新模型 2024-07-23 10:00:51 +08:00
4 changed files with 20 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "哔哩哔哩字幕列表",
"description": "显示B站视频的字幕列表,可点击跳转与下载字幕,并支持翻译和总结字幕!",
"version": "1.10.1",
"version": "1.10.2",
"manifest_version": 3,
"permissions": [
"storage"

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "bilibili-subtitle",
"version": "1.10.1",
"version": "1.10.2",
"type": "module",
"description": "哔哩哔哩字幕列表",
"main": "index.js",

View File

@@ -11,6 +11,7 @@ import {
LANGUAGES,
MODEL_DEFAULT,
MODEL_MAP,
MODEL_TIP,
MODELS,
PAGE_MAIN,
PROMPT_DEFAULTS,
@@ -257,13 +258,18 @@ const Settings = () => {
{MODELS.map(model => <option key={model.code} value={model.code}>{model.name}</option>)}
</select>
</FormItem>
<div className='desc text-xs'>
{MODEL_TIP}
</div>
{modelValue === 'custom' && <FormItem title='模型名' htmlFor='customModel'>
<input id='customModel' type='text' className='input input-sm input-bordered w-full' placeholder='llama2'
value={customModelValue} onChange={onChangeCustomModelValue}/>
</FormItem>}
{modelValue === 'custom' && <FormItem title='Token上限' htmlFor='customModelTokens'>
<input id='customModelTokens' type='number' className='input input-sm input-bordered w-full' placeholder={''+CUSTOM_MODEL_TOKENS}
value={customModelTokensValue} onChange={e => setCustomModelTokensValue(e.target.value?parseInt(e.target.value):undefined)}/>
<input id='customModelTokens' type='number' className='input input-sm input-bordered w-full'
placeholder={'' + CUSTOM_MODEL_TOKENS}
value={customModelTokensValue}
onChange={e => setCustomModelTokensValue(e.target.value ? parseInt(e.target.value) : undefined)}/>
</FormItem>}
</Section>}
@@ -274,10 +280,12 @@ const Settings = () => {
</FormItem>
<div>
<div className='desc text-xs'>
<div><a className='link link-primary' href='https://makersuite.google.com/app/apikey' target='_blank'
rel="noreferrer">Google AI Studio</a> ()
<div><a className='link link-primary' href='https://makersuite.google.com/app/apikey'
target='_blank'
rel="noreferrer">Google AI Studio</a> ()
</div>
<div className='text-xs text-error flex items-center'><IoWarning className='text-sm text-warning'/>!
</div>
<div className='text-xs text-error flex items-center'><IoWarning className='text-sm text-warning'/>!</div>
</div>
</div>
</Section>}

View File

@@ -222,24 +222,21 @@ export const ASK_ENABLED_DEFAULT = true
export const DEFAULT_SERVER_URL_OPENAI = 'https://api.openai.com'
export const CUSTOM_MODEL_TOKENS = 16385
export const MODEL_TIP = '推荐gpt-4o-mini能力强价格低token上限大'
export const MODELS = [{
code: 'gpt-3.5-turbo',
name: 'gpt-3.5-turbo',
tokens: 4096,
code: 'gpt-4o-mini',
name: 'gpt-4o-mini',
tokens: 128000,
}, {
code: 'gpt-3.5-turbo-0125',
name: 'gpt-3.5-turbo-0125',
tokens: 16385,
}, {
code: 'gpt-3.5-turbo-1106',
name: 'gpt-3.5-turbo-1106',
tokens: 16385,
}, {
code: 'custom',
name: '自定义',
}]
export const GEMINI_TOKENS = 32768
export const MODEL_DEFAULT = MODELS[1].code
export const MODEL_DEFAULT = MODELS[0].code
export const MODEL_MAP: {[key: string]: typeof MODELS[number]} = {}
for (const model of MODELS) {
MODEL_MAP[model.code] = model