Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbooth committed Apr 14, 2024
1 parent 11e7123 commit a6fc72c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ build
logs
data
/web/node_modules
cmd.md
cmd.md
one-api*
web/package-lock.json
2 changes: 1 addition & 1 deletion relay/adaptor/ali/constants.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ali

var ModelList = []string{
"qwen-turbo", "qwen-plus", "qwen-max", "qwen-max-longcontext",
"qwen-turbo", "qwen-plus", "qwen-max", "qwen-max-longcontext", "qwen-1.5-32b-Chat", "qwen-1.5-72b-Chat",
"text-embedding-v1",
"ali-stable-diffusion-xl", "ali-stable-diffusion-v1.5", "wanx-v1",
}
5 changes: 4 additions & 1 deletion relay/billing/ratio/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package ratio

import (
"encoding/json"
"github.com/songquanpeng/one-api/common/logger"
"strings"

"github.com/songquanpeng/one-api/common/logger"
)

const (
Expand Down Expand Up @@ -110,6 +111,8 @@ var ModelRatio = map[string]float64{
"qwen-plus": 1.4286, // ¥0.02 / 1k tokens
"qwen-max": 1.4286, // ¥0.02 / 1k tokens
"qwen-max-longcontext": 1.4286, // ¥0.02 / 1k tokens
"qwen-1.5-32b-Chat": 0.0001, // 限时免费
"qwen-1.5-72b-Chat": 1.4286, // ¥0.02 / 1k tokens
"text-embedding-v1": 0.05, // ¥0.0007 / 1k tokens
"ali-stable-diffusion-xl": 8,
"ali-stable-diffusion-v1.5": 8,
Expand Down
12 changes: 6 additions & 6 deletions web/air/src/pages/Channel/EditChannel.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, {useEffect, useRef, useState} from 'react';
import {useNavigate, useParams} from 'react-router-dom';
import {API, isMobile, showError, showInfo, showSuccess, verifyJSON} from '../../helpers';
import {CHANNEL_OPTIONS} from '../../constants';
import { Banner, Button, Checkbox, Input, Select, SideSheet, Space, Spin, TextArea, Typography } from "@douyinfe/semi-ui";
import Title from "@douyinfe/semi-ui/lib/es/typography/title";
import {SideSheet, Space, Spin, Button, Input, Typography, Select, TextArea, Checkbox, Banner} from "@douyinfe/semi-ui";
import React, { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { CHANNEL_OPTIONS } from '../../constants';
import { API, isMobile, showError, showInfo, showSuccess, verifyJSON } from '../../helpers';

const MODEL_MAPPING_EXAMPLE = {
'gpt-3.5-turbo-0301': 'gpt-3.5-turbo',
Expand Down Expand Up @@ -72,7 +72,7 @@ const EditChannel = (props) => {
localModels = ['ERNIE-Bot', 'ERNIE-Bot-turbo', 'ERNIE-Bot-4', 'Embedding-V1'];
break;
case 17:
localModels = ["qwen-turbo", "qwen-plus", "qwen-max", "qwen-max-longcontext", 'text-embedding-v1'];
localModels = ["qwen-turbo", "qwen-plus", "qwen-max", "qwen-max-longcontext", 'text-embedding-v1', "qwen-1.5-32b-Chat", "qwen-1.5-72b-Chat"];
break;
case 16:
localModels = ['chatglm_pro', 'chatglm_std', 'chatglm_lite'];
Expand Down
2 changes: 2 additions & 0 deletions web/berry/src/views/Channel/type/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ const typeConfig = {
"qwen-max",
"qwen-max-longcontext",
"text-embedding-v1",
"qwen-1.5-32b-Chat",
"qwen-1.5-72b-Chat"
],
},
prompt: {
Expand Down

0 comments on commit a6fc72c

Please sign in to comment.