mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-24 02:46:37 +08:00
移除检查更新
This commit is contained in:
parent
aa29868def
commit
452757140e
@ -36,6 +36,9 @@ func relayImageHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode
|
|||||||
if imageRequest.Size == "" {
|
if imageRequest.Size == "" {
|
||||||
imageRequest.Size = "1024x1024"
|
imageRequest.Size = "1024x1024"
|
||||||
}
|
}
|
||||||
|
if imageRequest.N == 0 {
|
||||||
|
imageRequest.N = 1
|
||||||
|
}
|
||||||
// Prompt validation
|
// Prompt validation
|
||||||
if imageRequest.Prompt == "" {
|
if imageRequest.Prompt == "" {
|
||||||
return errorWrapper(errors.New("prompt is required"), "required_field_missing", http.StatusBadRequest)
|
return errorWrapper(errors.New("prompt is required"), "required_field_missing", http.StatusBadRequest)
|
||||||
|
@ -54,6 +54,7 @@ func openaiStreamHandler(c *gin.Context, resp *http.Response, relayMode int) (*O
|
|||||||
err := json.Unmarshal(common.StringToByteSlice(streamResp), &streamResponses)
|
err := json.Unmarshal(common.StringToByteSlice(streamResp), &streamResponses)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.SysError("error unmarshalling stream response: " + err.Error())
|
common.SysError("error unmarshalling stream response: " + err.Error())
|
||||||
|
wg.Done()
|
||||||
return // just ignore the error
|
return // just ignore the error
|
||||||
}
|
}
|
||||||
for _, streamResponse := range streamResponses {
|
for _, streamResponse := range streamResponses {
|
||||||
@ -66,6 +67,7 @@ func openaiStreamHandler(c *gin.Context, resp *http.Response, relayMode int) (*O
|
|||||||
err := json.Unmarshal(common.StringToByteSlice(streamResp), &streamResponses)
|
err := json.Unmarshal(common.StringToByteSlice(streamResp), &streamResponses)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.SysError("error unmarshalling stream response: " + err.Error())
|
common.SysError("error unmarshalling stream response: " + err.Error())
|
||||||
|
wg.Done()
|
||||||
return // just ignore the error
|
return // just ignore the error
|
||||||
}
|
}
|
||||||
for _, streamResponse := range streamResponses {
|
for _, streamResponse := range streamResponses {
|
||||||
|
@ -108,7 +108,7 @@ const OtherSetting = () => {
|
|||||||
<Grid.Column>
|
<Grid.Column>
|
||||||
<Form loading={loading}>
|
<Form loading={loading}>
|
||||||
<Header as='h3'>通用设置</Header>
|
<Header as='h3'>通用设置</Header>
|
||||||
<Form.Button onClick={checkUpdate}>检查更新</Form.Button>
|
{/*<Form.Button onClick={checkUpdate}>检查更新</Form.Button>*/}
|
||||||
<Form.Group widths='equal'>
|
<Form.Group widths='equal'>
|
||||||
<Form.TextArea
|
<Form.TextArea
|
||||||
label='公告'
|
label='公告'
|
||||||
@ -178,28 +178,28 @@ const OtherSetting = () => {
|
|||||||
<Form.Button onClick={submitFooter}>设置页脚</Form.Button>
|
<Form.Button onClick={submitFooter}>设置页脚</Form.Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Grid.Column>
|
</Grid.Column>
|
||||||
<Modal
|
{/*<Modal*/}
|
||||||
onClose={() => setShowUpdateModal(false)}
|
{/* onClose={() => setShowUpdateModal(false)}*/}
|
||||||
onOpen={() => setShowUpdateModal(true)}
|
{/* onOpen={() => setShowUpdateModal(true)}*/}
|
||||||
open={showUpdateModal}
|
{/* open={showUpdateModal}*/}
|
||||||
>
|
{/*>*/}
|
||||||
<Modal.Header>新版本:{updateData.tag_name}</Modal.Header>
|
{/* <Modal.Header>新版本:{updateData.tag_name}</Modal.Header>*/}
|
||||||
<Modal.Content>
|
{/* <Modal.Content>*/}
|
||||||
<Modal.Description>
|
{/* <Modal.Description>*/}
|
||||||
<div dangerouslySetInnerHTML={{ __html: updateData.content }}></div>
|
{/* <div dangerouslySetInnerHTML={{ __html: updateData.content }}></div>*/}
|
||||||
</Modal.Description>
|
{/* </Modal.Description>*/}
|
||||||
</Modal.Content>
|
{/* </Modal.Content>*/}
|
||||||
<Modal.Actions>
|
{/* <Modal.Actions>*/}
|
||||||
<Button onClick={() => setShowUpdateModal(false)}>关闭</Button>
|
{/* <Button onClick={() => setShowUpdateModal(false)}>关闭</Button>*/}
|
||||||
<Button
|
{/* <Button*/}
|
||||||
content='详情'
|
{/* content='详情'*/}
|
||||||
onClick={() => {
|
{/* onClick={() => {*/}
|
||||||
setShowUpdateModal(false);
|
{/* setShowUpdateModal(false);*/}
|
||||||
openGitHubRelease();
|
{/* openGitHubRelease();*/}
|
||||||
}}
|
{/* }}*/}
|
||||||
/>
|
{/* />*/}
|
||||||
</Modal.Actions>
|
{/* </Modal.Actions>*/}
|
||||||
</Modal>
|
{/*</Modal>*/}
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user