Skip to content

Commit

Permalink
CV2-3482: Add paraphrase-multilingual-mpnet-base-v2 vector model
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmednasserswe authored Oct 3, 2023
1 parent 2fe41c1 commit 69641f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/bot/alegre.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Error < ::StandardError
INDIAN_MODEL = 'indian-sbert'
FILIPINO_MODEL = 'paraphrase-filipino-mpnet-base-v2'
OPENAI_ADA_MODEL = 'openai-text-embedding-ada-002'
PARAPHRASE_MULTILINGUAL_MODEL = 'paraphrase-multilingual-mpnet-base-v2'
ELASTICSEARCH_MODEL = 'elasticsearch'
DEFAULT_ES_SCORE = 10

Expand Down Expand Up @@ -724,7 +725,7 @@ def self.send_post_create_message(source, target, relationship)
end

def self.relationship_model_not_allowed(relationship_model)
allowed_models = [MEAN_TOKENS_MODEL, INDIAN_MODEL, FILIPINO_MODEL, OPENAI_ADA_MODEL, ELASTICSEARCH_MODEL, 'audio', 'image', 'video']
allowed_models = [MEAN_TOKENS_MODEL, INDIAN_MODEL, FILIPINO_MODEL, OPENAI_ADA_MODEL, PARAPHRASE_MULTILINGUAL_MODEL, ELASTICSEARCH_MODEL, 'audio', 'image', 'video']
models = relationship_model.split("|").collect{ |m| m.split('/').first }
models.length != (allowed_models&models).length
end
Expand Down

0 comments on commit 69641f1

Please sign in to comment.