generalbots/bottemplates/store-server.gbai/store-server.gbdialog/enrich-product.bas
Rodrigo Rodriguez (Pragmatismo) 037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00

28 lines
845 B
QBasic

PARAM product_id AS STRING
product = PRODUCT product_id
IF NOT product THEN
RETURN WITH error AS "Product not found"
END IF
IF product.description AND product.brand THEN
RETURN product
END IF
query = product.name + " " + product.category
links = SCRAPE_ALL "https://www.google.com/search?q=" + query, "a"
links = FIRST links, 10
enriched = []
FOR i = 0 TO 2
IF links[i] THEN
content = SCRAPE links[i], "body"
PUSH enriched, content
END IF
NEXT
result = LLM "Analyze these product descriptions: " + enriched + ". Create best description for: " + product.name + ". Return JSON with description, brand, material, features"
UPDATE "products" WITH description AS result.description, brand AS result.brand, material AS result.material, external_metadata AS result WHERE id = product_id
RETURN PRODUCT product_id