Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
6f9fd445
Commit
6f9fd445
authored
Jun 14, 2023
by
JzoNg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: re-segmentation
parent
1b3028d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
index.tsx
web/app/components/datasets/create/step-two/index.tsx
+1
-4
index.tsx
...p/components/datasets/documents/detail/settings/index.tsx
+1
-0
datasets.ts
web/service/datasets.ts
+3
-3
No files found.
web/app/components/datasets/create/step-two/index.tsx
View file @
6f9fd445
...
@@ -310,10 +310,7 @@ const StepTwo = ({
...
@@ -310,10 +310,7 @@ const StepTwo = ({
body
:
params
,
body
:
params
,
})
})
updateIndexingTypeCache
&&
updateIndexingTypeCache
(
indexType
)
updateIndexingTypeCache
&&
updateIndexingTypeCache
(
indexType
)
updateResultCache
&&
updateResultCache
({
updateResultCache
&&
updateResultCache
(
res
)
batch
:
res
.
batch
,
documents
:
[
res
],
})
}
}
onStepChange
&&
onStepChange
(
+
1
)
onStepChange
&&
onStepChange
(
+
1
)
isSetting
&&
onSave
&&
onSave
()
isSetting
&&
onSave
&&
onSave
()
...
...
web/app/components/datasets/documents/detail/settings/index.tsx
View file @
6f9fd445
...
@@ -71,6 +71,7 @@ const DocumentSettings = ({ datasetId, documentId }: DocumentSettingsProps) => {
...
@@ -71,6 +71,7 @@ const DocumentSettings = ({ datasetId, documentId }: DocumentSettingsProps) => {
hasSetAPIKEY=
{
hasSetAPIKEY
}
hasSetAPIKEY=
{
hasSetAPIKEY
}
onSetting=
{
showSetAPIKey
}
onSetting=
{
showSetAPIKey
}
datasetId=
{
datasetId
}
datasetId=
{
datasetId
}
dataSourceType=
{
documentDetail
.
data_source_type
}
indexingType=
{
indexingTechnique
||
''
}
indexingType=
{
indexingTechnique
||
''
}
isSetting
isSetting
documentDetail=
{
documentDetail
}
documentDetail=
{
documentDetail
}
...
...
web/service/datasets.ts
View file @
6f9fd445
import
type
{
Fetcher
}
from
'swr'
import
type
{
Fetcher
}
from
'swr'
import
qs
from
'qs'
import
qs
from
'qs'
import
{
del
,
get
,
patch
,
post
,
put
}
from
'./base'
import
{
del
,
get
,
patch
,
post
,
put
}
from
'./base'
import
type
{
CreateDocumentReq
,
DataSet
,
DataSetListResponse
,
DocumentDetailResponse
,
DocumentListResponse
,
FileIndexingEstimateResponse
,
HitTestingRecordsResponse
,
HitTestingResponse
,
IndexingEstimateResponse
,
IndexingStatusBatchResponse
,
IndexingStatusResponse
,
InitialDocumentDetail
,
ProcessRuleResponse
,
RelatedAppResponse
,
SegmentsQuery
,
SegmentsResponse
,
createDocumentResponse
}
from
'@/models/datasets'
import
type
{
CreateDocumentReq
,
DataSet
,
DataSetListResponse
,
DocumentDetailResponse
,
DocumentListResponse
,
FileIndexingEstimateResponse
,
HitTestingRecordsResponse
,
HitTestingResponse
,
IndexingEstimateResponse
,
IndexingStatusBatchResponse
,
IndexingStatusResponse
,
ProcessRuleResponse
,
RelatedAppResponse
,
SegmentsQuery
,
SegmentsResponse
,
createDocumentResponse
}
from
'@/models/datasets'
import
type
{
CommonResponse
,
DataSourceNotionWorkspace
}
from
'@/models/common'
import
type
{
CommonResponse
,
DataSourceNotionWorkspace
}
from
'@/models/common'
// apis for documents in a dataset
// apis for documents in a dataset
...
@@ -60,8 +60,8 @@ export const createFirstDocument: Fetcher<createDocumentResponse, { body: Create
...
@@ -60,8 +60,8 @@ export const createFirstDocument: Fetcher<createDocumentResponse, { body: Create
return
post
(
'/datasets/init'
,
{
body
})
as
Promise
<
createDocumentResponse
>
return
post
(
'/datasets/init'
,
{
body
})
as
Promise
<
createDocumentResponse
>
}
}
export
const
createDocument
:
Fetcher
<
InitialDocumentDetail
,
{
datasetId
:
string
;
body
:
CreateDocumentReq
}
>
=
({
datasetId
,
body
})
=>
{
export
const
createDocument
:
Fetcher
<
createDocumentResponse
,
{
datasetId
:
string
;
body
:
CreateDocumentReq
}
>
=
({
datasetId
,
body
})
=>
{
return
post
(
`/datasets/
${
datasetId
}
/documents`
,
{
body
})
as
Promise
<
InitialDocumentDetail
>
return
post
(
`/datasets/
${
datasetId
}
/documents`
,
{
body
})
as
Promise
<
createDocumentResponse
>
}
}
export
const
fetchIndexingEstimate
:
Fetcher
<
IndexingEstimateResponse
,
CommonDocReq
>
=
({
datasetId
,
documentId
})
=>
{
export
const
fetchIndexingEstimate
:
Fetcher
<
IndexingEstimateResponse
,
CommonDocReq
>
=
({
datasetId
,
documentId
})
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment