mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-12 11:15:57 +08:00
Compare commits
5 Commits
v0.5.1-alp
...
v0.5.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8cb86c2c1 | ||
|
|
f45d586400 | ||
|
|
50dec03ff3 | ||
|
|
f31d400b6f | ||
|
|
130e6bfd83 |
@@ -42,6 +42,7 @@ var ModelRatio = map[string]float64{
|
|||||||
"claude-2": 30,
|
"claude-2": 30,
|
||||||
"ERNIE-Bot": 0.8572, // ¥0.012 / 1k tokens
|
"ERNIE-Bot": 0.8572, // ¥0.012 / 1k tokens
|
||||||
"ERNIE-Bot-turbo": 0.5715, // ¥0.008 / 1k tokens
|
"ERNIE-Bot-turbo": 0.5715, // ¥0.008 / 1k tokens
|
||||||
|
"Embedding-V1": 0.1429, // ¥0.002 / 1k tokens
|
||||||
"PaLM-2": 1,
|
"PaLM-2": 1,
|
||||||
"chatglm_pro": 0.7143, // ¥0.01 / 1k tokens
|
"chatglm_pro": 0.7143, // ¥0.01 / 1k tokens
|
||||||
"chatglm_std": 0.3572, // ¥0.005 / 1k tokens
|
"chatglm_std": 0.3572, // ¥0.005 / 1k tokens
|
||||||
|
|||||||
@@ -288,6 +288,15 @@ func init() {
|
|||||||
Root: "ERNIE-Bot-turbo",
|
Root: "ERNIE-Bot-turbo",
|
||||||
Parent: nil,
|
Parent: nil,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Id: "Embedding-V1",
|
||||||
|
Object: "model",
|
||||||
|
Created: 1677649963,
|
||||||
|
OwnedBy: "baidu",
|
||||||
|
Permission: permission,
|
||||||
|
Root: "Embedding-V1",
|
||||||
|
Parent: nil,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Id: "PaLM-2",
|
Id: "PaLM-2",
|
||||||
Object: "model",
|
Object: "model",
|
||||||
|
|||||||
@@ -54,6 +54,25 @@ type BaiduChatStreamResponse struct {
|
|||||||
IsEnd bool `json:"is_end"`
|
IsEnd bool `json:"is_end"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type BaiduEmbeddingRequest struct {
|
||||||
|
Input []string `json:"input"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type BaiduEmbeddingData struct {
|
||||||
|
Object string `json:"object"`
|
||||||
|
Embedding []float64 `json:"embedding"`
|
||||||
|
Index int `json:"index"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type BaiduEmbeddingResponse struct {
|
||||||
|
Id string `json:"id"`
|
||||||
|
Object string `json:"object"`
|
||||||
|
Created int64 `json:"created"`
|
||||||
|
Data []BaiduEmbeddingData `json:"data"`
|
||||||
|
Usage Usage `json:"usage"`
|
||||||
|
BaiduError
|
||||||
|
}
|
||||||
|
|
||||||
func requestOpenAI2Baidu(request GeneralOpenAIRequest) *BaiduChatRequest {
|
func requestOpenAI2Baidu(request GeneralOpenAIRequest) *BaiduChatRequest {
|
||||||
messages := make([]BaiduMessage, 0, len(request.Messages))
|
messages := make([]BaiduMessage, 0, len(request.Messages))
|
||||||
for _, message := range request.Messages {
|
for _, message := range request.Messages {
|
||||||
@@ -112,6 +131,36 @@ func streamResponseBaidu2OpenAI(baiduResponse *BaiduChatStreamResponse) *ChatCom
|
|||||||
return &response
|
return &response
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func embeddingRequestOpenAI2Baidu(request GeneralOpenAIRequest) *BaiduEmbeddingRequest {
|
||||||
|
baiduEmbeddingRequest := BaiduEmbeddingRequest{
|
||||||
|
Input: nil,
|
||||||
|
}
|
||||||
|
switch request.Input.(type) {
|
||||||
|
case string:
|
||||||
|
baiduEmbeddingRequest.Input = []string{request.Input.(string)}
|
||||||
|
case []string:
|
||||||
|
baiduEmbeddingRequest.Input = request.Input.([]string)
|
||||||
|
}
|
||||||
|
return &baiduEmbeddingRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
func embeddingResponseBaidu2OpenAI(response *BaiduEmbeddingResponse) *OpenAIEmbeddingResponse {
|
||||||
|
openAIEmbeddingResponse := OpenAIEmbeddingResponse{
|
||||||
|
Object: "list",
|
||||||
|
Data: make([]OpenAIEmbeddingResponseItem, 0, len(response.Data)),
|
||||||
|
Model: "baidu-embedding",
|
||||||
|
Usage: response.Usage,
|
||||||
|
}
|
||||||
|
for _, item := range response.Data {
|
||||||
|
openAIEmbeddingResponse.Data = append(openAIEmbeddingResponse.Data, OpenAIEmbeddingResponseItem{
|
||||||
|
Object: item.Object,
|
||||||
|
Index: item.Index,
|
||||||
|
Embedding: item.Embedding,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return &openAIEmbeddingResponse
|
||||||
|
}
|
||||||
|
|
||||||
func baiduStreamHandler(c *gin.Context, resp *http.Response) (*OpenAIErrorWithStatusCode, *Usage) {
|
func baiduStreamHandler(c *gin.Context, resp *http.Response) (*OpenAIErrorWithStatusCode, *Usage) {
|
||||||
var usage Usage
|
var usage Usage
|
||||||
scanner := bufio.NewScanner(resp.Body)
|
scanner := bufio.NewScanner(resp.Body)
|
||||||
@@ -212,3 +261,39 @@ func baiduHandler(c *gin.Context, resp *http.Response) (*OpenAIErrorWithStatusCo
|
|||||||
_, err = c.Writer.Write(jsonResponse)
|
_, err = c.Writer.Write(jsonResponse)
|
||||||
return nil, &fullTextResponse.Usage
|
return nil, &fullTextResponse.Usage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func baiduEmbeddingHandler(c *gin.Context, resp *http.Response) (*OpenAIErrorWithStatusCode, *Usage) {
|
||||||
|
var baiduResponse BaiduEmbeddingResponse
|
||||||
|
responseBody, err := io.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return errorWrapper(err, "read_response_body_failed", http.StatusInternalServerError), nil
|
||||||
|
}
|
||||||
|
err = resp.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return errorWrapper(err, "close_response_body_failed", http.StatusInternalServerError), nil
|
||||||
|
}
|
||||||
|
err = json.Unmarshal(responseBody, &baiduResponse)
|
||||||
|
if err != nil {
|
||||||
|
return errorWrapper(err, "unmarshal_response_body_failed", http.StatusInternalServerError), nil
|
||||||
|
}
|
||||||
|
if baiduResponse.ErrorMsg != "" {
|
||||||
|
return &OpenAIErrorWithStatusCode{
|
||||||
|
OpenAIError: OpenAIError{
|
||||||
|
Message: baiduResponse.ErrorMsg,
|
||||||
|
Type: "baidu_error",
|
||||||
|
Param: "",
|
||||||
|
Code: baiduResponse.ErrorCode,
|
||||||
|
},
|
||||||
|
StatusCode: resp.StatusCode,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
fullTextResponse := embeddingResponseBaidu2OpenAI(&baiduResponse)
|
||||||
|
jsonResponse, err := json.Marshal(fullTextResponse)
|
||||||
|
if err != nil {
|
||||||
|
return errorWrapper(err, "marshal_response_body_failed", http.StatusInternalServerError), nil
|
||||||
|
}
|
||||||
|
c.Writer.Header().Set("Content-Type", "application/json")
|
||||||
|
c.Writer.WriteHeader(resp.StatusCode)
|
||||||
|
_, err = c.Writer.Write(jsonResponse)
|
||||||
|
return nil, &fullTextResponse.Usage
|
||||||
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
|
|||||||
// map model name
|
// map model name
|
||||||
modelMapping := c.GetString("model_mapping")
|
modelMapping := c.GetString("model_mapping")
|
||||||
isModelMapped := false
|
isModelMapped := false
|
||||||
if modelMapping != "" {
|
if modelMapping != "" && modelMapping != "{}" {
|
||||||
modelMap := make(map[string]string)
|
modelMap := make(map[string]string)
|
||||||
err := json.Unmarshal([]byte(modelMapping), &modelMap)
|
err := json.Unmarshal([]byte(modelMapping), &modelMap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -139,6 +139,8 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
|
|||||||
fullRequestURL = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant"
|
fullRequestURL = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant"
|
||||||
case "BLOOMZ-7B":
|
case "BLOOMZ-7B":
|
||||||
fullRequestURL = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/bloomz_7b1"
|
fullRequestURL = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/bloomz_7b1"
|
||||||
|
case "Embedding-V1":
|
||||||
|
fullRequestURL = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/embeddings/embedding-v1"
|
||||||
}
|
}
|
||||||
apiKey := c.Request.Header.Get("Authorization")
|
apiKey := c.Request.Header.Get("Authorization")
|
||||||
apiKey = strings.TrimPrefix(apiKey, "Bearer ")
|
apiKey = strings.TrimPrefix(apiKey, "Bearer ")
|
||||||
@@ -212,12 +214,20 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
|
|||||||
}
|
}
|
||||||
requestBody = bytes.NewBuffer(jsonStr)
|
requestBody = bytes.NewBuffer(jsonStr)
|
||||||
case APITypeBaidu:
|
case APITypeBaidu:
|
||||||
baiduRequest := requestOpenAI2Baidu(textRequest)
|
var jsonData []byte
|
||||||
jsonStr, err := json.Marshal(baiduRequest)
|
var err error
|
||||||
|
switch relayMode {
|
||||||
|
case RelayModeEmbeddings:
|
||||||
|
baiduEmbeddingRequest := embeddingRequestOpenAI2Baidu(textRequest)
|
||||||
|
jsonData, err = json.Marshal(baiduEmbeddingRequest)
|
||||||
|
default:
|
||||||
|
baiduRequest := requestOpenAI2Baidu(textRequest)
|
||||||
|
jsonData, err = json.Marshal(baiduRequest)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errorWrapper(err, "marshal_text_request_failed", http.StatusInternalServerError)
|
return errorWrapper(err, "marshal_text_request_failed", http.StatusInternalServerError)
|
||||||
}
|
}
|
||||||
requestBody = bytes.NewBuffer(jsonStr)
|
requestBody = bytes.NewBuffer(jsonData)
|
||||||
case APITypePaLM:
|
case APITypePaLM:
|
||||||
palmRequest := requestOpenAI2PaLM(textRequest)
|
palmRequest := requestOpenAI2PaLM(textRequest)
|
||||||
jsonStr, err := json.Marshal(palmRequest)
|
jsonStr, err := json.Marshal(palmRequest)
|
||||||
@@ -386,7 +396,14 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
err, usage := baiduHandler(c, resp)
|
var err *OpenAIErrorWithStatusCode
|
||||||
|
var usage *Usage
|
||||||
|
switch relayMode {
|
||||||
|
case RelayModeEmbeddings:
|
||||||
|
err, usage = baiduEmbeddingHandler(c, resp)
|
||||||
|
default:
|
||||||
|
err, usage = baiduHandler(c, resp)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,19 @@ type OpenAITextResponse struct {
|
|||||||
Usage `json:"usage"`
|
Usage `json:"usage"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OpenAIEmbeddingResponseItem struct {
|
||||||
|
Object string `json:"object"`
|
||||||
|
Index int `json:"index"`
|
||||||
|
Embedding []float64 `json:"embedding"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type OpenAIEmbeddingResponse struct {
|
||||||
|
Object string `json:"object"`
|
||||||
|
Data []OpenAIEmbeddingResponseItem `json:"data"`
|
||||||
|
Model string `json:"model"`
|
||||||
|
Usage `json:"usage"`
|
||||||
|
}
|
||||||
|
|
||||||
type ImageResponse struct {
|
type ImageResponse struct {
|
||||||
Created int `json:"created"`
|
Created int `json:"created"`
|
||||||
Data []struct {
|
Data []struct {
|
||||||
|
|||||||
@@ -363,9 +363,12 @@ const ChannelsTable = () => {
|
|||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
<Table.Cell>
|
<Table.Cell>
|
||||||
<Popup
|
<Popup
|
||||||
content={channel.balance_updated_time ? renderTimestamp(channel.balance_updated_time) : '未更新'}
|
trigger={<span onClick={() => {
|
||||||
key={channel.id}
|
updateChannelBalance(channel.id, channel.name, idx);
|
||||||
trigger={renderBalance(channel.type, channel.balance)}
|
}} style={{ cursor: 'pointer' }}>
|
||||||
|
{renderBalance(channel.type, channel.balance)}
|
||||||
|
</span>}
|
||||||
|
content="点击更新"
|
||||||
basic
|
basic
|
||||||
/>
|
/>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
@@ -380,16 +383,16 @@ const ChannelsTable = () => {
|
|||||||
>
|
>
|
||||||
测试
|
测试
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
{/*<Button*/}
|
||||||
size={'small'}
|
{/* size={'small'}*/}
|
||||||
positive
|
{/* positive*/}
|
||||||
loading={updatingBalance}
|
{/* loading={updatingBalance}*/}
|
||||||
onClick={() => {
|
{/* onClick={() => {*/}
|
||||||
updateChannelBalance(channel.id, channel.name, idx);
|
{/* updateChannelBalance(channel.id, channel.name, idx);*/}
|
||||||
}}
|
{/* }}*/}
|
||||||
>
|
{/*>*/}
|
||||||
更新余额
|
{/* 更新余额*/}
|
||||||
</Button>
|
{/*</Button>*/}
|
||||||
<Popup
|
<Popup
|
||||||
trigger={
|
trigger={
|
||||||
<Button size='small' negative>
|
<Button size='small' negative>
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ const UsersTable = () => {
|
|||||||
content={user.email ? user.email : '未绑定邮箱地址'}
|
content={user.email ? user.email : '未绑定邮箱地址'}
|
||||||
key={user.username}
|
key={user.username}
|
||||||
header={user.display_name ? user.display_name : user.username}
|
header={user.display_name ? user.display_name : user.username}
|
||||||
trigger={<span>{renderText(user.username, 10)}</span>}
|
trigger={<span>{renderText(user.username, 15)}</span>}
|
||||||
hoverable
|
hoverable
|
||||||
/>
|
/>
|
||||||
</Table.Cell>
|
</Table.Cell>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const toastConstants = {
|
export const toastConstants = {
|
||||||
SUCCESS_TIMEOUT: 500,
|
SUCCESS_TIMEOUT: 1500,
|
||||||
INFO_TIMEOUT: 3000,
|
INFO_TIMEOUT: 3000,
|
||||||
ERROR_TIMEOUT: 5000,
|
ERROR_TIMEOUT: 5000,
|
||||||
WARNING_TIMEOUT: 10000,
|
WARNING_TIMEOUT: 10000,
|
||||||
|
|||||||
@@ -35,6 +35,27 @@ const EditChannel = () => {
|
|||||||
const [customModel, setCustomModel] = useState('');
|
const [customModel, setCustomModel] = useState('');
|
||||||
const handleInputChange = (e, { name, value }) => {
|
const handleInputChange = (e, { name, value }) => {
|
||||||
setInputs((inputs) => ({ ...inputs, [name]: value }));
|
setInputs((inputs) => ({ ...inputs, [name]: value }));
|
||||||
|
if (name === 'type' && inputs.models.length === 0) {
|
||||||
|
let localModels = [];
|
||||||
|
switch (value) {
|
||||||
|
case 14:
|
||||||
|
localModels = ['claude-instant-1', 'claude-2'];
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
localModels = ['PaLM-2'];
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
localModels = ['ERNIE-Bot', 'ERNIE-Bot-turbo', 'Embedding-V1'];
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
localModels = ['qwen-v1', 'qwen-plus-v1'];
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
localModels = ['chatglm_pro', 'chatglm_std', 'chatglm_lite'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
setInputs((inputs) => ({ ...inputs, models: localModels }));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadChannel = async () => {
|
const loadChannel = async () => {
|
||||||
@@ -132,7 +153,10 @@ const EditChannel = () => {
|
|||||||
localInputs.base_url = localInputs.base_url.slice(0, localInputs.base_url.length - 1);
|
localInputs.base_url = localInputs.base_url.slice(0, localInputs.base_url.length - 1);
|
||||||
}
|
}
|
||||||
if (localInputs.type === 3 && localInputs.other === '') {
|
if (localInputs.type === 3 && localInputs.other === '') {
|
||||||
localInputs.other = '2023-03-15-preview';
|
localInputs.other = '2023-06-01-preview';
|
||||||
|
}
|
||||||
|
if (localInputs.model_mapping === '') {
|
||||||
|
localInputs.model_mapping = '{}';
|
||||||
}
|
}
|
||||||
let res;
|
let res;
|
||||||
localInputs.models = localInputs.models.join(',');
|
localInputs.models = localInputs.models.join(',');
|
||||||
@@ -192,7 +216,7 @@ const EditChannel = () => {
|
|||||||
<Form.Input
|
<Form.Input
|
||||||
label='默认 API 版本'
|
label='默认 API 版本'
|
||||||
name='other'
|
name='other'
|
||||||
placeholder={'请输入默认 API 版本,例如:2023-03-15-preview,该配置可以被实际的请求查询参数所覆盖'}
|
placeholder={'请输入默认 API 版本,例如:2023-06-01-preview,该配置可以被实际的请求查询参数所覆盖'}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
value={inputs.other}
|
value={inputs.other}
|
||||||
autoComplete='new-password'
|
autoComplete='new-password'
|
||||||
@@ -270,8 +294,8 @@ const EditChannel = () => {
|
|||||||
}}>清除所有模型</Button>
|
}}>清除所有模型</Button>
|
||||||
<Input
|
<Input
|
||||||
action={
|
action={
|
||||||
<Button type={'button'} onClick={()=>{
|
<Button type={'button'} onClick={() => {
|
||||||
if (customModel.trim() === "") return;
|
if (customModel.trim() === '') return;
|
||||||
if (inputs.models.includes(customModel)) return;
|
if (inputs.models.includes(customModel)) return;
|
||||||
let localModels = [...inputs.models];
|
let localModels = [...inputs.models];
|
||||||
localModels.push(customModel);
|
localModels.push(customModel);
|
||||||
@@ -279,9 +303,9 @@ const EditChannel = () => {
|
|||||||
localModelOptions.push({
|
localModelOptions.push({
|
||||||
key: customModel,
|
key: customModel,
|
||||||
text: customModel,
|
text: customModel,
|
||||||
value: customModel,
|
value: customModel
|
||||||
});
|
});
|
||||||
setModelOptions(modelOptions=>{
|
setModelOptions(modelOptions => {
|
||||||
return [...modelOptions, ...localModelOptions];
|
return [...modelOptions, ...localModelOptions];
|
||||||
});
|
});
|
||||||
setCustomModel('');
|
setCustomModel('');
|
||||||
@@ -297,7 +321,7 @@ const EditChannel = () => {
|
|||||||
</div>
|
</div>
|
||||||
<Form.Field>
|
<Form.Field>
|
||||||
<Form.TextArea
|
<Form.TextArea
|
||||||
label='模型映射'
|
label='模型重定向'
|
||||||
placeholder={`此项可选,用于修改请求体中的模型名称,为一个 JSON 字符串,键为请求中模型名称,值为要替换的模型名称,例如:\n${JSON.stringify(MODEL_MAPPING_EXAMPLE, null, 2)}`}
|
placeholder={`此项可选,用于修改请求体中的模型名称,为一个 JSON 字符串,键为请求中模型名称,值为要替换的模型名称,例如:\n${JSON.stringify(MODEL_MAPPING_EXAMPLE, null, 2)}`}
|
||||||
name='model_mapping'
|
name='model_mapping'
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
@@ -323,7 +347,7 @@ const EditChannel = () => {
|
|||||||
label='密钥'
|
label='密钥'
|
||||||
name='key'
|
name='key'
|
||||||
required
|
required
|
||||||
placeholder={inputs.type === 15 ? "请输入 access token,当前版本暂不支持自动刷新,请每 30 天更新一次" : '请输入渠道对应的鉴权密钥'}
|
placeholder={inputs.type === 15 ? '请输入 access token,当前版本暂不支持自动刷新,请每 30 天更新一次' : '请输入渠道对应的鉴权密钥'}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
value={inputs.key}
|
value={inputs.key}
|
||||||
autoComplete='new-password'
|
autoComplete='new-password'
|
||||||
@@ -354,7 +378,7 @@ const EditChannel = () => {
|
|||||||
</Form.Field>
|
</Form.Field>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
<Button type={isEdit ? "button" : "submit"} positive onClick={submit}>提交</Button>
|
<Button type={isEdit ? 'button' : 'submit'} positive onClick={submit}>提交</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Segment>
|
</Segment>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const EditToken = () => {
|
|||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
showSuccess('令牌更新成功!');
|
showSuccess('令牌更新成功!');
|
||||||
} else {
|
} else {
|
||||||
showSuccess('令牌创建成功!');
|
showSuccess('令牌创建成功,请在列表页面点击复制获取令牌!');
|
||||||
setInputs(originInputs);
|
setInputs(originInputs);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user