mirror of
https://github.com/User0332/rewards-farmer.git
synced 2026-09-17 01:41:37 +00:00
add a query source that does not need a language model
Idea taken from TheNetsky/Microsoft-Rewards-Script, which builds search terms from public feeds rather than a model. No code from it: that project is GPL-3.0 and this one is MIT, so only the approach crosses over. The LLM has exactly two call sites here, both producing a short string to type into Bing. Everything the dependency costs, an Ollama account, cloud usage and the provider work in #15, is paid for search strings. Three keyless sources answer the same question: Google Trends RSS queries people are actually typing right now Wikipedia most-read topic seeds when trends is unavailable Bing autosuggest expands a seed into related queries Autosuggest is what makes the chaining work. Asking Bing what follows a term returns queries Bing already expects, which is nearer to what the prompt in llm_utils was reaching for than a model guessing unaided. Selected with QUERY_SOURCE=trends. The default stays llm, so no existing setup changes. stdlib only, no new dependencies. Measured against the LLM on the same cards from a live account: card llm trends airport parking best rates airport parking reservations reserve airport parking best rates checking vs savings compare checking vs savings accounts compare checking savings account options cruise deals best cruise deals and destinations cruise deals destinations Verified live with OLLAMA_HOST pointed at a dead port, so nothing could reach a model: five queries generated from feeds and three typed into Bing, each landing on a real results page. Every source degrades to an empty list rather than raising, and both entry points fall back, to the trimmed task description and to nouns.txt. A search that does not happen costs points; a run that dies costs the rest of the day.
This commit is contained in:
@@ -10,7 +10,7 @@ from selenium.webdriver.remote.webelement import WebElement
|
||||
from selenium.webdriver.common.action_chains import ActionChains
|
||||
from selenium.common.exceptions import StaleElementReferenceException, TimeoutException, NoSuchElementException
|
||||
import tab_utils
|
||||
import llm_utils
|
||||
import queries
|
||||
import mouse_trajectory
|
||||
import mimic_typing
|
||||
import element_selectors
|
||||
@@ -93,7 +93,7 @@ class RewardsTaskUtils:
|
||||
|
||||
for card in explore_on_bing_links:
|
||||
desc = self.elements.extract_card_descriptions(card)
|
||||
query = llm_utils.get_search_query_from_task_description(desc)
|
||||
query = queries.search_query_for_task(desc)
|
||||
|
||||
self.move_to_and_click(card)
|
||||
self.tab_utils.switch_to_other_tab()
|
||||
@@ -220,9 +220,7 @@ class RewardsTaskUtils:
|
||||
# search bar should be auto-focused
|
||||
|
||||
for i, query in enumerate(
|
||||
llm_utils.get_related_search_queries(
|
||||
llm_utils.get_random_noun(), num_queries=count
|
||||
)
|
||||
queries.related_queries(count)
|
||||
):
|
||||
self.keyboard.send_keys(f"{query} -noai{Keys.ENTER}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user