Skip to content

Add R personal shopper using OpenAI/Ollama + SerpAPI - #9

Open
charles-hebert wants to merge 1 commit into
mainfrom
codex/create-personal-shopper-in-r
Open

Add R personal shopper using OpenAI/Ollama + SerpAPI#9
charles-hebert wants to merge 1 commit into
mainfrom
codex/create-personal-shopper-in-r

Conversation

@charles-hebert

Copy link
Copy Markdown
Owner

Motivation

  • Provide a CLI-driven personal shopper implemented in R that reads a text list of items to scout and automates query generation, multi-engine shopping searches, and suggestion ranking.
  • Support either openai or ollama LLM providers to generate search queries and to rank results so users can choose local or hosted models.
  • Normalize and aggregate shopping results from search APIs to produce a compact CSV/table report (price, store, link) for easy consumption.

Description

  • Added personal_shopper.R, a new script with a CLI entrypoint and core functions: read_interest_items, generate_queries, search_serpapi, rank_suggestions, shop_item, and run_personal_shopper.
  • Implemented provider adapters openai_chat_json and ollama_chat_json and a dispatcher llm_chat_json so the same workflow can use either OpenAI or Ollama models.
  • Implemented SerpAPI-based scouting via search_serpapi that normalizes title, price, store, and link, deduplicates results, and extracts numeric prices with safe_num.
  • Added interests_sample.txt as an example input and a CSV output path with write_csv for consolidated results; default search engines are google_shopping, bing_shopping, and ebay.

Testing

  • Attempted a syntax/parse check using Rscript -e "parse(file='personal_shopper.R'); cat('OK\n')", but it failed because Rscript is not available in the environment, so no runtime validation was completed.
  • No end-to-end runs against external services were performed because runtime dependencies and API keys (SERPAPI_KEY, OPENAI_API_KEY or reachable OLLAMA_HOST) were not present or the runtime was unavailable.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant