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
7f3dec7b
Unverified
Commit
7f3dec7b
authored
Mar 06, 2024
by
Jyong
Committed by
GitHub
Mar 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error msg format issue (#2715)
Co-authored-by:
jyong
<
jyong@dify.ai
>
parent
b1e0db49
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
text_embedding.py
...model_providers/baichuan/text_embedding/text_embedding.py
+1
-1
text_embedding.py
...ime/model_providers/jina/text_embedding/text_embedding.py
+1
-1
text_embedding.py
.../model_providers/localai/text_embedding/text_embedding.py
+1
-1
text_embedding.py
.../model_providers/minimax/text_embedding/text_embedding.py
+1
-1
text_embedding.py
.../model_providers/openllm/text_embedding/text_embedding.py
+1
-1
No files found.
api/core/model_runtime/model_providers/baichuan/text_embedding/text_embedding.py
View file @
7f3dec7b
...
...
@@ -108,7 +108,7 @@ class BaichuanTextEmbeddingModel(TextEmbeddingModel):
try
:
response
=
post
(
url
,
headers
=
headers
,
data
=
dumps
(
data
))
except
Exception
as
e
:
raise
InvokeConnectionError
(
e
)
raise
InvokeConnectionError
(
str
(
e
)
)
if
response
.
status_code
!=
200
:
try
:
...
...
api/core/model_runtime/model_providers/jina/text_embedding/text_embedding.py
View file @
7f3dec7b
...
...
@@ -57,7 +57,7 @@ class JinaTextEmbeddingModel(TextEmbeddingModel):
try
:
response
=
post
(
url
,
headers
=
headers
,
data
=
dumps
(
data
))
except
Exception
as
e
:
raise
InvokeConnectionError
(
e
)
raise
InvokeConnectionError
(
str
(
e
)
)
if
response
.
status_code
!=
200
:
try
:
...
...
api/core/model_runtime/model_providers/localai/text_embedding/text_embedding.py
View file @
7f3dec7b
...
...
@@ -59,7 +59,7 @@ class LocalAITextEmbeddingModel(TextEmbeddingModel):
try
:
response
=
post
(
join
(
url
,
'embeddings'
),
headers
=
headers
,
data
=
dumps
(
data
),
timeout
=
10
)
except
Exception
as
e
:
raise
InvokeConnectionError
(
e
)
raise
InvokeConnectionError
(
str
(
e
)
)
if
response
.
status_code
!=
200
:
try
:
...
...
api/core/model_runtime/model_providers/minimax/text_embedding/text_embedding.py
View file @
7f3dec7b
...
...
@@ -65,7 +65,7 @@ class MinimaxTextEmbeddingModel(TextEmbeddingModel):
try
:
response
=
post
(
url
,
headers
=
headers
,
data
=
dumps
(
data
))
except
Exception
as
e
:
raise
InvokeConnectionError
(
e
)
raise
InvokeConnectionError
(
str
(
e
)
)
if
response
.
status_code
!=
200
:
raise
InvokeServerUnavailableError
(
response
.
text
)
...
...
api/core/model_runtime/model_providers/openllm/text_embedding/text_embedding.py
View file @
7f3dec7b
...
...
@@ -53,7 +53,7 @@ class OpenLLMTextEmbeddingModel(TextEmbeddingModel):
# cloud not connect to the server
raise
InvokeAuthorizationError
(
f
"Invalid server URL: {e}"
)
except
Exception
as
e
:
raise
InvokeConnectionError
(
e
)
raise
InvokeConnectionError
(
str
(
e
)
)
if
response
.
status_code
!=
200
:
if
response
.
status_code
==
400
:
...
...
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