Better description

pull/1391/head
Simon 3 years ago
parent b9eff2f138
commit e146faf6bc

@ -81,7 +81,9 @@ def get_subreddit_threads(POST_ID: str):
threads = subreddit.hot(limit=50)
keywords = settings.config["ai"]["ai_similarity_keywords"].split(',')
keywords = [keyword.strip() for keyword in keywords]
print(f'Sorting threads by similarity to the given keywords {keywords}')
# Reformat the keywords for printing
keywords_print = ", ".join(keywords)
print(f'Sorting threads by similarity to the given keywords: {keywords_print}')
threads, similarity_scores = sort_by_similarity(threads, keywords)
submission, similarity_score = get_subreddit_undone(threads, subreddit, similarity_scores=similarity_scores)
else:

@ -15,7 +15,7 @@ post_lang = { default = "", optional = true, explanation = "The language you wou
min_comments = { default = 20, optional = false, nmin = 15, type = "int", explanation = "The minimum number of comments a post should have to be included. default is 20", example = 29, oob_error = "the minimum number of comments should be between 15 and 999999" }
[ai]
ai_similarity_enabled = {optional = true, option = [true, false], default = false, type = "bool", explanation = "If set to yes, then threads read from Reddit are sorted based on their similarity to the keywords given below"}
ai_similarity_enabled = {optional = true, option = [true, false], default = false, type = "bool", explanation = "Threads read from Reddit are sorted based on their similarity to the keywords given below"}
ai_similarity_keywords = {optional = true, type="str", example= 'Elon Musk, Twitter, Stocks', explanation = "Every keyword or even sentence, seperated with comma, is used to sort the reddit threads based on similarity"}
[settings]

Loading…
Cancel
Save