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
117a209a
Unverified
Commit
117a209a
authored
Aug 23, 2023
by
yezhwi
Committed by
GitHub
Aug 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix:condition for dataset availability check (#973)
parent
071e7800
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
hit_testing_service.py
api/services/hit_testing_service.py
+1
-1
.gitignore
web/.gitignore
+2
-0
No files found.
api/services/hit_testing_service.py
View file @
117a209a
...
@@ -19,7 +19,7 @@ from models.dataset import Dataset, DocumentSegment, DatasetQuery
...
@@ -19,7 +19,7 @@ from models.dataset import Dataset, DocumentSegment, DatasetQuery
class
HitTestingService
:
class
HitTestingService
:
@
classmethod
@
classmethod
def
retrieve
(
cls
,
dataset
:
Dataset
,
query
:
str
,
account
:
Account
,
limit
:
int
=
10
)
->
dict
:
def
retrieve
(
cls
,
dataset
:
Dataset
,
query
:
str
,
account
:
Account
,
limit
:
int
=
10
)
->
dict
:
if
dataset
.
available_document_count
==
0
or
dataset
.
available_
docu
ment_count
==
0
:
if
dataset
.
available_document_count
==
0
or
dataset
.
available_
seg
ment_count
==
0
:
return
{
return
{
"query"
:
{
"query"
:
{
"content"
:
query
,
"content"
:
query
,
...
...
web/.gitignore
View file @
117a209a
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
# production
# production
/build
/build
/.history
# misc
# misc
.DS_Store
.DS_Store
*.pem
*.pem
...
...
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