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
5a2aa830
Unverified
Commit
5a2aa830
authored
Jan 03, 2024
by
takatost
Committed by
GitHub
Jan 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ciphertext error (#1872)
parent
4de27d04
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
17 deletions
+24
-17
llm.py
..._runtime/model_providers/openai_api_compatible/llm/llm.py
+0
-2
provider_manager.py
api/core/provider_manager.py
+24
-15
No files found.
api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py
View file @
5a2aa830
...
...
@@ -6,8 +6,6 @@ import json
from
typing
import
Optional
,
Generator
,
Union
,
List
,
cast
from
sympy
import
comp
from
core.model_runtime.entities.common_entities
import
I18nObject
from
core.model_runtime.utils
import
helper
...
...
api/core/provider_manager.py
View file @
5a2aa830
...
...
@@ -452,11 +452,14 @@ class ProviderManager:
for
variable
in
provider_credential_secret_variables
:
if
variable
in
provider_credentials
:
try
:
provider_credentials
[
variable
]
=
encrypter
.
decrypt_token_with_decoding
(
provider_credentials
.
get
(
variable
),
decoding_rsa_key
,
decoding_cipher_rsa
)
except
ValueError
:
pass
custom_provider_configuration
=
CustomProviderConfiguration
(
credentials
=
provider_credentials
...
...
@@ -481,11 +484,14 @@ class ProviderManager:
for
variable
in
model_credential_secret_variables
:
if
variable
in
provider_model_credentials
:
try
:
provider_model_credentials
[
variable
]
=
encrypter
.
decrypt_token_with_decoding
(
provider_model_credentials
.
get
(
variable
),
decoding_rsa_key
,
decoding_cipher_rsa
)
except
ValueError
:
pass
custom_model_configurations
.
append
(
CustomModelConfiguration
(
...
...
@@ -577,11 +583,14 @@ class ProviderManager:
for
variable
in
provider_credential_secret_variables
:
if
variable
in
provider_credentials
:
try
:
provider_credentials
[
variable
]
=
encrypter
.
decrypt_token_with_decoding
(
provider_credentials
.
get
(
variable
),
decoding_rsa_key
,
decoding_cipher_rsa
)
except
ValueError
:
pass
current_using_credentials
=
provider_credentials
else
:
...
...
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