lint
This commit is contained in:
parent
4b938efa6e
commit
9e4a007a4a
|
@ -3,9 +3,8 @@
|
|||
module DiscourseAI
|
||||
module Embeddings
|
||||
class Topic
|
||||
|
||||
DISCOURSE_MODELS = %i{all-mpnet-base-v2 msmarco-distilbert-base-v4}
|
||||
OPENAI_MODELS = %i{text-embedding-ada-002}
|
||||
DISCOURSE_MODELS = %i[all-mpnet-base-v2 msmarco-distilbert-base-v4]
|
||||
OPENAI_MODELS = %i[text-embedding-ada-002]
|
||||
|
||||
def initialize(topic)
|
||||
@topic = topic
|
||||
|
@ -48,9 +47,7 @@ module DiscourseAI
|
|||
end
|
||||
|
||||
def openai_embeddings
|
||||
DiscourseAI::Inference::OpenAIEmbeddings.perform!(
|
||||
@topic.first_post.raw
|
||||
)
|
||||
DiscourseAI::Inference::OpenAIEmbeddings.perform!(@topic.first_post.raw)
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -58,7 +55,6 @@ module DiscourseAI
|
|||
def enabled_models
|
||||
SiteSetting.ai_embeddings_models.split("|").map(&:to_sym)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue