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
5ca4c4a4
Unverified
Commit
5ca4c4a4
authored
Jan 03, 2024
by
Jyong
Committed by
GitHub
Jan 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add qdrant client timeout limit (#1894)
Co-authored-by:
jyong
<
jyong@dify.ai
>
parent
a44022c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
config.py
api/config.py
+1
-0
qdrant_vector_index.py
api/core/index/vector_index/qdrant_vector_index.py
+2
-0
vector_index.py
api/core/index/vector_index/vector_index.py
+2
-1
No files found.
api/config.py
View file @
5ca4c4a4
...
...
@@ -197,6 +197,7 @@ class Config:
# qdrant settings
self
.
QDRANT_URL
=
get_env
(
'QDRANT_URL'
)
self
.
QDRANT_API_KEY
=
get_env
(
'QDRANT_API_KEY'
)
self
.
QDRANT_CLIENT_TIMEOUT
=
get_env
(
'QDRANT_CLIENT_TIMEOUT'
)
# milvus / zilliz setting
self
.
MILVUS_HOST
=
get_env
(
'MILVUS_HOST'
)
...
...
api/core/index/vector_index/qdrant_vector_index.py
View file @
5ca4c4a4
...
...
@@ -18,6 +18,7 @@ from models.dataset import Dataset, DatasetCollectionBinding
class
QdrantConfig
(
BaseModel
):
endpoint
:
str
api_key
:
Optional
[
str
]
timeout
:
float
=
20
root_path
:
Optional
[
str
]
def
to_qdrant_params
(
self
):
...
...
@@ -33,6 +34,7 @@ class QdrantConfig(BaseModel):
return
{
'url'
:
self
.
endpoint
,
'api_key'
:
self
.
api_key
,
'timeout'
:
self
.
timeout
}
...
...
api/core/index/vector_index/vector_index.py
View file @
5ca4c4a4
...
...
@@ -49,7 +49,8 @@ class VectorIndex:
config
=
QdrantConfig
(
endpoint
=
config
.
get
(
'QDRANT_URL'
),
api_key
=
config
.
get
(
'QDRANT_API_KEY'
),
root_path
=
current_app
.
root_path
root_path
=
current_app
.
root_path
,
timeout
=
config
.
get
(
'QDRANT_CLIENT_TIMEOUT'
)
),
embeddings
=
embeddings
)
...
...
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