mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 16:36:37 +08:00
commit
a8c8dfc330
@ -14,6 +14,7 @@ import (
|
|||||||
// 1 === $0.002 / 1K tokens
|
// 1 === $0.002 / 1K tokens
|
||||||
// 1 === ¥0.014 / 1k tokens
|
// 1 === ¥0.014 / 1k tokens
|
||||||
var ModelRatio = map[string]float64{
|
var ModelRatio = map[string]float64{
|
||||||
|
"midjourney": 50,
|
||||||
"gpt-4": 15,
|
"gpt-4": 15,
|
||||||
"gpt-4-0314": 15,
|
"gpt-4-0314": 15,
|
||||||
"gpt-4-0613": 15,
|
"gpt-4-0613": 15,
|
||||||
|
@ -54,6 +54,15 @@ func init() {
|
|||||||
})
|
})
|
||||||
// https://platform.openai.com/docs/models/model-endpoint-compatibility
|
// https://platform.openai.com/docs/models/model-endpoint-compatibility
|
||||||
openAIModels = []OpenAIModels{
|
openAIModels = []OpenAIModels{
|
||||||
|
{
|
||||||
|
Id: "midjourney",
|
||||||
|
Object: "model",
|
||||||
|
Created: 1677649963,
|
||||||
|
OwnedBy: "Midjourney",
|
||||||
|
Permission: permission,
|
||||||
|
Root: "midjourney",
|
||||||
|
Parent: nil,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Id: "dall-e-2",
|
Id: "dall-e-2",
|
||||||
Object: "model",
|
Object: "model",
|
||||||
|
@ -2,7 +2,7 @@ version: '3.4'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
one-api:
|
one-api:
|
||||||
image: justsong/one-api:latest
|
image: calciumion/neko-api:main
|
||||||
container_name: one-api
|
container_name: one-api
|
||||||
restart: always
|
restart: always
|
||||||
command: --log-dir /app/logs
|
command: --log-dir /app/logs
|
||||||
|
@ -15,7 +15,7 @@ import {
|
|||||||
IconLayers,
|
IconLayers,
|
||||||
IconSetting,
|
IconSetting,
|
||||||
IconCreditCard,
|
IconCreditCard,
|
||||||
IconSemiLogo,
|
IconComment,
|
||||||
IconHome,
|
IconHome,
|
||||||
IconImage
|
IconImage
|
||||||
} from '@douyinfe/semi-icons';
|
} from '@douyinfe/semi-icons';
|
||||||
@ -36,7 +36,13 @@ let headerButtons = [
|
|||||||
icon: <IconLayers/>,
|
icon: <IconLayers/>,
|
||||||
className: isAdmin()?'semi-navigation-item-normal':'tableHiddle',
|
className: isAdmin()?'semi-navigation-item-normal':'tableHiddle',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
text: '聊天',
|
||||||
|
itemKey: 'chat',
|
||||||
|
to: '/chat',
|
||||||
|
icon: <IconComment />,
|
||||||
|
className: localStorage.getItem('chat_link')?'semi-navigation-item-normal':'tableHiddle',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: '令牌',
|
text: '令牌',
|
||||||
itemKey: 'token',
|
itemKey: 'token',
|
||||||
@ -89,14 +95,6 @@ let headerButtons = [
|
|||||||
// }
|
// }
|
||||||
];
|
];
|
||||||
|
|
||||||
if (localStorage.getItem('chat_link')) {
|
|
||||||
headerButtons.splice(1, 0, {
|
|
||||||
name: '聊天',
|
|
||||||
to: '/chat',
|
|
||||||
icon: 'comments'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const HeaderBar = () => {
|
const HeaderBar = () => {
|
||||||
const [userState, userDispatch] = useContext(UserContext);
|
const [userState, userDispatch] = useContext(UserContext);
|
||||||
let navigate = useNavigate();
|
let navigate = useNavigate();
|
||||||
@ -134,6 +132,7 @@ const HeaderBar = () => {
|
|||||||
midjourney: "/midjourney",
|
midjourney: "/midjourney",
|
||||||
setting: "/setting",
|
setting: "/setting",
|
||||||
about: "/about",
|
about: "/about",
|
||||||
|
chat: "/chat",
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export const CHANNEL_OPTIONS = [
|
export const CHANNEL_OPTIONS = [
|
||||||
{ key: 1, text: 'OpenAI', value: 1, color: 'green' },
|
{ key: 1, text: 'OpenAI', value: 1, color: 'green' },
|
||||||
|
{ key: 99, text: 'Midjourney-Proxy', value: 99, color: 'green' },
|
||||||
{ key: 14, text: 'Anthropic Claude', value: 14, color: 'black' },
|
{ key: 14, text: 'Anthropic Claude', value: 14, color: 'black' },
|
||||||
{ key: 3, text: 'Azure OpenAI', value: 3, color: 'olive' },
|
{ key: 3, text: 'Azure OpenAI', value: 3, color: 'olive' },
|
||||||
{ key: 11, text: 'Google PaLM2', value: 11, color: 'orange' },
|
{ key: 11, text: 'Google PaLM2', value: 11, color: 'orange' },
|
||||||
|
Loading…
Reference in New Issue
Block a user