FIX: Non instructor OSS embeddings was broken (#65)

This commit is contained in:
Rafael dos Santos Silva 2023-05-17 12:10:10 -03:00 committed by GitHub
parent 5ade5d7404
commit e9ae28f773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ module DiscourseAi
truncated_input = DiscourseAi::Tokenizer::BertTokenizer.truncate(input, max_sequence_lenght)
if name.start_with?("instructor")
instructed_input = [
truncated_input = [
[SiteSetting.ai_embeddings_semantic_related_instruction, truncated_input],
]
end
@ -78,7 +78,7 @@ module DiscourseAi
DiscourseAi::Inference::DiscourseClassifier.perform!(
"#{SiteSetting.ai_embeddings_discourse_service_api_endpoint}/api/v1/classify",
name.to_s,
instructed_input,
truncated_input,
SiteSetting.ai_embeddings_discourse_service_api_key,
)
end