mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-28 04:44:14 +00:00
feat: make text source optional
This commit is contained in:
parent
0ea1ec032d
commit
bcf897d50a
@ -296,9 +296,9 @@ const Documents = () => {
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
Source:
|
Text Source(Optional):
|
||||||
<Input
|
<Input
|
||||||
placeholder="Please input the source"
|
placeholder="Please input the text source"
|
||||||
onChange={(e: any) => setTextSource(e.target.value)}
|
onChange={(e: any) => setTextSource(e.target.value)}
|
||||||
sx={{ marginBottom: '20px' }}
|
sx={{ marginBottom: '20px' }}
|
||||||
/>
|
/>
|
||||||
@ -395,10 +395,6 @@ const Documents = () => {
|
|||||||
message.error(data.err_msg || 'failed')
|
message.error(data.err_msg || 'failed')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (textSource === '') {
|
|
||||||
message.error('Please input the source')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (text === '') {
|
if (text === '') {
|
||||||
message.error('Please input the text')
|
message.error('Please input the text')
|
||||||
return
|
return
|
||||||
|
@ -308,9 +308,9 @@ const Index = () => {
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
Source:
|
Text Source(Optional):
|
||||||
<Input
|
<Input
|
||||||
placeholder="Please input the source"
|
placeholder="Please input the text source"
|
||||||
onChange={(e: any) => setTextSource(e.target.value)}
|
onChange={(e: any) => setTextSource(e.target.value)}
|
||||||
sx={{ marginBottom: '20px' }}
|
sx={{ marginBottom: '20px' }}
|
||||||
/>
|
/>
|
||||||
@ -379,10 +379,6 @@ const Index = () => {
|
|||||||
message.error(data.err_msg || 'failed')
|
message.error(data.err_msg || 'failed')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (textSource === '') {
|
|
||||||
message.error('Please input the source')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (text === '') {
|
if (text === '') {
|
||||||
message.error('Please input the text')
|
message.error('Please input the text')
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user