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
38b99012
Unverified
Commit
38b99012
authored
Sep 11, 2023
by
Rhon Joe
Committed by
GitHub
Sep 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(web): complete some ts type (#1148)
parent
642842d6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
index.tsx
.../components/datasets/documents/detail/completed/index.tsx
+1
-1
index.tsx
...components/header/account-setting/key-validator/index.tsx
+1
-1
datasets-context.tsx
web/context/datasets-context.tsx
+1
-1
debug-configuration.ts
web/context/debug-configuration.ts
+6
-0
debug.ts
web/models/debug.ts
+6
-12
No files found.
web/app/components/datasets/documents/detail/completed/index.tsx
View file @
38b99012
...
...
@@ -239,7 +239,7 @@ const Completed: FC<ICompletedProps> = ({
// the current segment id and whether to show the modal
const
[
currSegment
,
setCurrSegment
]
=
useState
<
{
segInfo
?:
SegmentDetailModel
;
showModal
:
boolean
}
>
({
showModal
:
false
})
const
[
searchValue
,
setSearchValue
]
=
useState
()
// the search value
const
[
searchValue
,
setSearchValue
]
=
useState
<
string
>
()
// the search value
const
[
selectedStatus
,
setSelectedStatus
]
=
useState
<
boolean
|
'all'
>
(
'all'
)
// the selected status, enabled/disabled/undefined
const
[
lastSegmentsRes
,
setLastSegmentsRes
]
=
useState
<
SegmentsResponse
|
undefined
>
(
undefined
)
...
...
web/app/components/header/account-setting/key-validator/index.tsx
View file @
38b99012
...
...
@@ -100,7 +100,7 @@ const KeyValidator = ({
className=
'mb-4'
name=
{
form
.
title
}
placeholder=
{
form
.
placeholder
}
value=
{
value
[
form
.
key
]
||
''
}
value=
{
value
[
form
.
key
]
as
string
||
''
}
onChange=
{
v
=>
handleChange
(
form
,
v
)
}
onFocus=
{
()
=>
handleFocus
(
form
)
}
validating=
{
validating
}
...
...
web/context/datasets-context.tsx
View file @
38b99012
...
...
@@ -12,7 +12,7 @@ export type DatasetsContextValue = {
const
DatasetsContext
=
createContext
<
DatasetsContextValue
>
({
datasets
:
[],
mutateDatasets
:
()
=>
{},
currentDataset
:
undefined
currentDataset
:
undefined
,
})
export
const
useDatasetsContext
=
()
=>
useContext
(
DatasetsContext
)
...
...
web/context/debug-configuration.ts
View file @
38b99012
...
...
@@ -92,6 +92,12 @@ const DebugConfigurationContext = createContext<IDebugConfiguration>({
prompt_template
:
''
,
prompt_variables
:
[],
},
opening_statement
:
null
,
more_like_this
:
null
,
suggested_questions_after_answer
:
null
,
speech_to_text
:
null
,
retriever_resource
:
null
,
dataSets
:
[],
},
setModelConfig
:
()
=>
{
},
dataSets
:
[],
...
...
web/models/debug.ts
View file @
38b99012
...
...
@@ -35,24 +35,18 @@ export type SpeechToTextConfig = MoreLikeThisConfig
export
type
CitationConfig
=
MoreLikeThisConfig
export
type
RetrieverResourceConfig
=
MoreLikeThisConfig
// frontend use. Not the same as backend
export
type
ModelConfig
=
{
provider
:
string
// LLM Provider: for example "OPENAI"
model_id
:
string
configs
:
PromptConfig
opening_statement
:
string
|
null
more_like_this
:
{
enabled
:
boolean
}
|
null
suggested_questions_after_answer
:
{
enabled
:
boolean
}
|
null
speech_to_text
:
{
enabled
:
boolean
}
|
null
retriever_resource
:
{
enabled
:
boolean
}
|
null
more_like_this
:
MoreLikeThisConfig
|
null
suggested_questions_after_answer
:
SuggestedQuestionsAfterAnswerConfig
|
null
speech_to_text
:
SpeechToTextConfig
|
null
retriever_resource
:
RetrieverResourceConfig
|
null
dataSets
:
any
[]
}
...
...
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