Merge commit '1c2654320e5b6268b13b6efca40ce37a523d032b'

This commit is contained in:
Laisky.Cai
2024-04-28 01:53:31 +00:00
162 changed files with 1351 additions and 731 deletions

View File

@@ -22,7 +22,7 @@
默认主题,由 [JustSong](https://github.com/songquanpeng) 开发。
预览:
|![image](https://github.com/Laisky/one-api/assets/39998050/ccfbc668-3a7f-4bc1-87da-7eacfd7bf371)|![image](https://github.com/Laisky/one-api/assets/39998050/a63ed547-44b9-45db-b43a-ecea07d60840)|
|![image](https://github.com/songquanpeng/one-api/assets/39998050/ccfbc668-3a7f-4bc1-87da-7eacfd7bf371)|![image](https://github.com/songquanpeng/one-api/assets/39998050/a63ed547-44b9-45db-b43a-ecea07d60840)|
|:---:|:---:|
### 主题berry
@@ -32,9 +32,9 @@
预览:
|||
|:---:|:---:|
|![image](https://github.com/Laisky/one-api/assets/42402987/36aff5c6-c5ff-4a90-8e3d-33d5cff34cbf)|![image](https://github.com/Laisky/one-api/assets/42402987/9ac63b36-5140-4064-8fad-fc9d25821509)|
|![image](https://github.com/Laisky/one-api/assets/42402987/fb2b1c64-ef24-4027-9b80-0cd9d945a47f)|![image](https://github.com/Laisky/one-api/assets/42402987/b6b649ec-2888-4324-8b2d-d5e11554eed6)|
|![image](https://github.com/Laisky/one-api/assets/42402987/6d3b22e0-436b-4e26-8911-bcc993c6a2bd)|![image](https://github.com/Laisky/one-api/assets/42402987/eef1e224-7245-44d7-804e-9d1c8fa3f29c)|
|![image](https://github.com/songquanpeng/one-api/assets/42402987/36aff5c6-c5ff-4a90-8e3d-33d5cff34cbf)|![image](https://github.com/songquanpeng/one-api/assets/42402987/9ac63b36-5140-4064-8fad-fc9d25821509)|
|![image](https://github.com/songquanpeng/one-api/assets/42402987/fb2b1c64-ef24-4027-9b80-0cd9d945a47f)|![image](https://github.com/songquanpeng/one-api/assets/42402987/b6b649ec-2888-4324-8b2d-d5e11554eed6)|
|![image](https://github.com/songquanpeng/one-api/assets/42402987/6d3b22e0-436b-4e26-8911-bcc993c6a2bd)|![image](https://github.com/songquanpeng/one-api/assets/42402987/eef1e224-7245-44d7-804e-9d1c8fa3f29c)|
### 主题air
由 [Calon](https://github.com/Calcium-Ion) 开发。
@@ -44,4 +44,4 @@
#### 开发说明
请查看 [web/berry/README.md](https://github.com/Laisky/one-api/tree/main/web/berry/README.md)
请查看 [web/berry/README.md](https://github.com/songquanpeng/one-api/tree/main/web/berry/README.md)

View File

@@ -38,7 +38,7 @@ const Footer = () => {
) : (
<div className='custom-footer'>
<a
href='https://github.com/Laisky/one-api'
href='https://github.com/songquanpeng/one-api'
target='_blank'
>
{systemName} {process.env.REACT_APP_VERSION}{' '}

View File

@@ -90,7 +90,7 @@ const OtherSetting = () => {
const openGitHubRelease = () => {
window.location =
'https://github.com/Laisky/one-api/releases/latest';
'https://github.com/songquanpeng/one-api/releases/latest';
};
const checkUpdate = async () => {
@@ -141,7 +141,7 @@ const OtherSetting = () => {
<Form.Group widths='equal'>
<Form.Input
label={<label>主题名称<Link
to='https://github.com/Laisky/one-api/blob/main/web/README.md'>当前可用主题</Link></label>}
to='https://github.com/songquanpeng/one-api/blob/main/web/README.md'>当前可用主题</Link></label>}
placeholder='请输入主题名称'
value={inputs.Theme}
name='Theme'

View File

@@ -37,8 +37,8 @@ const About = () => {
<Header as='h3'>关于</Header>
<p>可在设置页面设置关于内容支持 HTML & Markdown</p>
项目仓库地址
<a href='https://github.com/Laisky/one-api'>
https://github.com/Laisky/one-api
<a href='https://github.com/songquanpeng/one-api'>
https://github.com/songquanpeng/one-api
</a>
</Segment>
</> : <>

View File

@@ -324,7 +324,7 @@ const EditChannel = (props) => {
注意<strong>模型部署名称必须和模型名称保持一致</strong> One API
model
参数替换为你的部署名称模型名称中的点会被剔除<a target='_blank'
href='https://github.com/Laisky/one-api/issues/133?notification_referrer_id=NT_kwDOAmJSYrM2NjIwMzI3NDgyOjM5OTk4MDUw#issuecomment-1571602271'>图片演示</a>
href='https://github.com/songquanpeng/one-api/issues/133?notification_referrer_id=NT_kwDOAmJSYrM2NjIwMzI3NDgyOjM5OTk4MDUw#issuecomment-1571602271'>图片演示</a>
</>
}>
</Banner>

View File

@@ -73,10 +73,10 @@ const Home = () => {
<p>
源码
<a
href='https://github.com/Laisky/one-api'
href='https://github.com/songquanpeng/one-api'
target='_blank' rel='noreferrer'
>
https://github.com/Laisky/one-api
https://github.com/songquanpeng/one-api
</a>
</p>
<p>启动时间{getStartTimeString()}</p>

View File

@@ -137,6 +137,12 @@ export const CHANNEL_OPTIONS = {
value: 36,
color: 'primary'
},
38: {
key: 38,
text: 'DeepL',
value: 38,
color: 'primary'
},
8: {
key: 8,
text: '自定义渠道',

View File

@@ -15,7 +15,7 @@ const Footer = () => {
<div className="custom-footer" dangerouslySetInnerHTML={{ __html: siteInfo.footer_html }}></div>
) : (
<>
<Link href="https://github.com/Laisky/one-api" target="_blank">
<Link href="https://github.com/songquanpeng/one-api" target="_blank">
{siteInfo.system_name} {process.env.REACT_APP_VERSION}{' '}
</Link>
{' '}

View File

@@ -41,7 +41,7 @@ const About = () => {
<Typography variant="body2">
可在设置页面设置关于内容支持 HTML & Markdown <br />
项目仓库地址
<a href="https://github.com/Laisky/one-api">https://github.com/Laisky/one-api</a>
<a href="https://github.com/songquanpeng/one-api">https://github.com/songquanpeng/one-api</a>
</Typography>
</MainCard>
</Container>

View File

@@ -26,7 +26,7 @@ const BaseIndex = () => (
<Button
variant="contained"
startIcon={<GitHub />}
href="https://github.com/Laisky/one-api"
href="https://github.com/songquanpeng/one-api"
target="_blank"
sx={{ backgroundColor: '#24292e', color: '#fff', width: 'fit-content', boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)' }}
>

View File

@@ -106,7 +106,7 @@ const OtherSetting = () => {
};
const openGitHubRelease = () => {
window.location = 'https://github.com/Laisky/one-api/releases/latest';
window.location = 'https://github.com/songquanpeng/one-api/releases/latest';
};
const checkUpdate = async () => {

View File

@@ -38,7 +38,7 @@ const Footer = () => {
) : (
<div className='custom-footer'>
<a
href='https://github.com/Laisky/one-api'
href='https://github.com/songquanpeng/one-api'
target='_blank'
>
{systemName} {process.env.REACT_APP_VERSION}{' '}

View File

@@ -90,7 +90,7 @@ const OtherSetting = () => {
const openGitHubRelease = () => {
window.location =
'https://github.com/Laisky/one-api/releases/latest';
'https://github.com/songquanpeng/one-api/releases/latest';
};
const checkUpdate = async () => {
@@ -141,7 +141,7 @@ const OtherSetting = () => {
<Form.Group widths='equal'>
<Form.Input
label={<label>主题名称<Link
to='https://github.com/Laisky/one-api/blob/main/web/README.md'>当前可用主题</Link></label>}
to='https://github.com/songquanpeng/one-api/blob/main/web/README.md'>当前可用主题</Link></label>}
placeholder='请输入主题名称'
value={inputs.Theme}
name='Theme'

View File

@@ -1,38 +1,40 @@
export const CHANNEL_OPTIONS = [
{ key: 1, text: 'OpenAI', value: 1, color: 'green' },
{ key: 14, text: 'Anthropic Claude', value: 14, color: 'black' },
{ key: 33, text: 'AWS Claude', value: 33, color: 'black' },
{ key: 3, text: 'Azure OpenAI', value: 3, color: 'olive' },
{ key: 11, text: 'Google PaLM2', value: 11, color: 'orange' },
{ key: 24, text: 'Google Gemini', value: 24, color: 'orange' },
{ key: 28, text: 'Mistral AI', value: 28, color: 'orange' },
{ key: 15, text: '百度文心千帆', value: 15, color: 'blue' },
{ key: 17, text: '阿里通义千问', value: 17, color: 'orange' },
{ key: 18, text: '讯飞星火认知', value: 18, color: 'blue' },
{ key: 16, text: '智谱 ChatGLM', value: 16, color: 'violet' },
{ key: 19, text: '360 智脑', value: 19, color: 'blue' },
{ key: 25, text: 'Moonshot AI', value: 25, color: 'black' },
{ key: 23, text: '腾讯混元', value: 23, color: 'teal' },
{ key: 26, text: '百川大模型', value: 26, color: 'orange' },
{ key: 27, text: 'MiniMax', value: 27, color: 'red' },
{ key: 29, text: 'Groq', value: 29, color: 'orange' },
{ key: 30, text: 'Ollama', value: 30, color: 'black' },
{ key: 31, text: '零一万物', value: 31, color: 'green' },
{ key: 32, text: '阶跃星辰', value: 32, color: 'blue' },
{ key: 34, text: 'Coze', value: 34, color: 'blue' },
{ key: 35, text: 'Cohere', value: 35, color: 'blue' },
{ key: 36, text: 'DeepSeek', value: 36, color: 'black' },
{ key: 8, text: '自定义渠道', value: 8, color: 'pink' },
{ key: 22, text: '知识库FastGPT', value: 22, color: 'blue' },
{ key: 21, text: '知识库AI Proxy', value: 21, color: 'purple' },
{ key: 20, text: '代理OpenRouter', value: 20, color: 'black' },
{ key: 2, text: '代理API2D', value: 2, color: 'blue' },
{ key: 5, text: '代理OpenAI-SB', value: 5, color: 'brown' },
{ key: 7, text: '代理:OhMyGPT', value: 7, color: 'purple' },
{ key: 10, text: '代理:AI Proxy', value: 10, color: 'purple' },
{ key: 4, text: '代理:CloseAI', value: 4, color: 'teal' },
{ key: 6, text: '代理:OpenAI Max', value: 6, color: 'violet' },
{ key: 9, text: '代理:AI.LS', value: 9, color: 'yellow' },
{ key: 12, text: '代理:API2GPT', value: 12, color: 'blue' },
{ key: 13, text: '代理AIGC2D', value: 13, color: 'purple' }
{key: 1, text: 'OpenAI', value: 1, color: 'green'},
{key: 14, text: 'Anthropic Claude', value: 14, color: 'black'},
{key: 33, text: 'AWS Claude', value: 33, color: 'black'},
{key: 3, text: 'Azure OpenAI', value: 3, color: 'olive'},
{key: 11, text: 'Google PaLM2', value: 11, color: 'orange'},
{key: 24, text: 'Google Gemini', value: 24, color: 'orange'},
{key: 28, text: 'Mistral AI', value: 28, color: 'orange'},
{key: 15, text: '百度文心千帆', value: 15, color: 'blue'},
{key: 17, text: '阿里通义千问', value: 17, color: 'orange'},
{key: 18, text: '讯飞星火认知', value: 18, color: 'blue'},
{key: 16, text: '智谱 ChatGLM', value: 16, color: 'violet'},
{key: 19, text: '360 智脑', value: 19, color: 'blue'},
{key: 25, text: 'Moonshot AI', value: 25, color: 'black'},
{key: 23, text: '腾讯混元', value: 23, color: 'teal'},
{key: 26, text: '百川大模型', value: 26, color: 'orange'},
{key: 27, text: 'MiniMax', value: 27, color: 'red'},
{key: 29, text: 'Groq', value: 29, color: 'orange'},
{key: 30, text: 'Ollama', value: 30, color: 'black'},
{key: 31, text: '零一万物', value: 31, color: 'green'},
{key: 32, text: '阶跃星辰', value: 32, color: 'blue'},
{key: 34, text: 'Coze', value: 34, color: 'blue'},
{key: 35, text: 'Cohere', value: 35, color: 'blue'},
{key: 36, text: 'DeepSeek', value: 36, color: 'black'},
{key: 37, text: 'Cloudflare', value: 37, color: 'orange'},
{key: 38, text: 'DeepL', value: 38, color: 'black'},
{key: 8, text: '自定义渠道', value: 8, color: 'pink'},
{key: 22, text: '知识库FastGPT', value: 22, color: 'blue'},
{key: 21, text: '知识库AI Proxy', value: 21, color: 'purple'},
{key: 20, text: '代理OpenRouter', value: 20, color: 'black'},
{key: 2, text: '代理:API2D', value: 2, color: 'blue'},
{key: 5, text: '代理:OpenAI-SB', value: 5, color: 'brown'},
{key: 7, text: '代理:OhMyGPT', value: 7, color: 'purple'},
{key: 10, text: '代理:AI Proxy', value: 10, color: 'purple'},
{key: 4, text: '代理:CloseAI', value: 4, color: 'teal'},
{key: 6, text: '代理:OpenAI Max', value: 6, color: 'violet'},
{key: 9, text: '代理AI.LS', value: 9, color: 'yellow'},
{key: 12, text: '代理API2GPT', value: 12, color: 'blue'},
{key: 13, text: '代理AIGC2D', value: 13, color: 'purple'}
];

View File

@@ -37,8 +37,8 @@ const About = () => {
<Header as='h3'>关于</Header>
<p>可在设置页面设置关于内容支持 HTML & Markdown</p>
项目仓库地址
<a href='https://github.com/Laisky/one-api'>
https://github.com/Laisky/one-api
<a href='https://github.com/songquanpeng/one-api'>
https://github.com/songquanpeng/one-api
</a>
</Segment>
</> : <>

View File

@@ -246,7 +246,7 @@ const EditChannel = () => {
<Message>
注意<strong>模型部署名称必须和模型名称保持一致</strong> One API model
参数替换为你的部署名称模型名称中的点会被剔除<a target='_blank'
href='https://github.com/Laisky/one-api/issues/133?notification_referrer_id=NT_kwDOAmJSYrM2NjIwMzI3NDgyOjM5OTk4MDUw#issuecomment-1571602271'>图片演示</a>
href='https://github.com/songquanpeng/one-api/issues/133?notification_referrer_id=NT_kwDOAmJSYrM2NjIwMzI3NDgyOjM5OTk4MDUw#issuecomment-1571602271'>图片演示</a>
</Message>
<Form.Field>
<Form.Input
@@ -488,6 +488,21 @@ const EditChannel = () => {
/>
</Form.Field>)
}
{
inputs.type === 37 && (
<Form.Field>
<Form.Input
label='Account ID'
name='user_id'
required
placeholder={'请输入 Account ID例如d8d7c61dbc334c32d3ced580e4bf42b4'}
onChange={handleConfigChange}
value={config.user_id}
autoComplete=''
/>
</Form.Field>
)
}
{
inputs.type !== 33 && !isEdit && (
<Form.Checkbox

View File

@@ -69,10 +69,10 @@ const Home = () => {
<p>
源码
<a
href='https://github.com/Laisky/one-api'
href='https://github.com/songquanpeng/one-api'
target='_blank'
>
https://github.com/Laisky/one-api
https://github.com/songquanpeng/one-api
</a>
</p>
<p>启动时间{getStartTimeString()}</p>