mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-20 14:39:16 +08:00
fix annotation query exception (#1771)
Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
parent
5bb841935e
commit
ebc2cdad2e
@ -341,6 +341,7 @@ class Completion:
|
||||
app = conversation_message_task.app
|
||||
annotation_reply = app_model_config.annotation_reply_dict
|
||||
if annotation_reply['enabled']:
|
||||
try:
|
||||
score_threshold = annotation_reply.get('score_threshold', 1)
|
||||
embedding_provider_name = annotation_reply['embedding_model']['embedding_provider_name']
|
||||
embedding_model_name = annotation_reply['embedding_model']['embedding_model_name']
|
||||
@ -401,6 +402,9 @@ class Completion:
|
||||
from_source,
|
||||
score)
|
||||
return True
|
||||
except Exception as e:
|
||||
logging.warning(f'Query annotation failed, exception: {str(e)}.')
|
||||
return False
|
||||
return False
|
||||
|
||||
@classmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user