Open moda20 opened 4 months ago
Please report this issue on Vercel AI SDK: https://github.com/vercel/ai
@mishushakov why ? is the zod package using the Vercel AI ?
The issue here seems to be that the model is not powerfull enough for scraping. I played around for a bit and looks like this is something which will not work yet.
This is the PROMPT and response from llama 3.1
{
content: "JSON schema:\n{\"type\":\"object\",\"properties\":{\"top\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\"},\"points\":{\"type\":\"number\"},\"by\":{\"type\":\"string\"},\"commentsURL\":{\"type\":\"string\"}},\"required\":[\"title\",\"points\",\"by\",\"commentsURL\"],\"additionalProperties\":false},\"minItems\":5,\"maxItems\":5,\"description\":\"Top 5 stories on Hacker News\"}},\"required\":[\"top\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"}\nYou MUST answer with a JSON object that matches the JSON schema above.",
role: "system",
}
{
content: "You are a sophisticated web scraper. Extract the contents of the webpage",
role: "system",
}
{
content: "<html lang=\"en\" op=\"news\"><head><meta name=\"referrer\" content=\"origin\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><link rel=\"stylesheet\" type=\"text/css\" href=\"news.css?YGXVdxEPU89UzYvgeaVU\">\n <link rel=\"icon\" href=\"y18.svg\">\n <link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"rss\">\n <title>Hacker News</title></head><body><center><table id=\"hnmain\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"85%\" bgcolor=\"#f6f6ef\">\n <tbody><tr><td bgcolor=\"#ff6600\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"padding:2px\"><tbody><tr><td style=\"width:18px;padding-right:4px\"><a href=\"https://news.ycombinator.com\"><img src=\"y18.svg\" width=\"18\" height=\"18\" style=\"border:1px white solid; display:block\"></a></td>\n <td style=\"line-height:12pt; height:10px;\"><span class=\"pagetop\"><b class=\"hnname\"><a href=\"news\">Hacker News</a></b>\n <a href=\"newest\">new</a> | <a href=\"front\">past</a> | <a href=\"newcomments\">comments</a> | <a href=\"ask\">ask</a> | <a href=\"show\">show</a> | <a href=\"jobs\">jobs</a> | <a href=\"submit\" rel=\"nofollow\">submit</a> </span></td><td style=\"text-align:right;padding-right:4px;\"><span class=\"pagetop\">\n <a href=\"login?goto=news\">login</a>\n </span></td>\n </tr></tbody></table></td></tr>\n<tr id=\"pagespace\" title=\"\" style=\"height:10px\"></tr><tr><td><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tbody><tr class=\"athing\" id=\"41700516\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">1.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41700516\" href=\"vote?id=41700516&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.nytimes.com/2024/09/30/us/california-bans-legacy-admissions-private-universities.html\">California bans legacy admissions at private universities</a><span class=\"sitebit comhead\"> (<a href=\"from?site=nytimes.com\"><span class=\"sitestr\">nytimes.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41700516\">143 points</span> by <a href=\"user?id=JumpCrisscross\" class=\"hnuser\">JumpCrisscross</a> <span class=\"age\" title=\"2024-09-30T18:42:03.000000Z\"><a href=\"item?id=41700516\">58 minutes ago</a></span> <span id=\"unv_41700516\"></span> | <a href=\"hide?id=41700516&goto=news\">hide</a> | <a href=\"item?id=41700516\">98 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41694044\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">2.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41694044\" href=\"vote?id=41694044&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://walzr.com/bop-spotter\">Bop Spotter</a><span class=\"sitebit comhead\"> (<a href=\"from?site=walzr.com\"><span class=\"sitestr\">walzr.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41694044\">1048 points</span> by <a href=\"user?id=walz\" class=\"hnuser\">walz</a> <span class=\"age\" title=\"2024-09-30T06:09:53.000000Z\"><a href=\"item?id=41694044\">13 hours ago</a></span> <span id=\"unv_41694044\"></span> | <a href=\"hide?id=41694044&goto=news\">hide</a> | <a href=\"item?id=41694044\">211 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41700496\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">3.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41700496\" href=\"vote?id=41700496&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.macrumors.com/2024/09/30/apple-no-longer-investing-openai-chatgpt/\">Apple No Longer in Talks to Invest in ChatGPT Maker OpenAI</a><span class=\"sitebit comhead\"> (<a href=\"from?site=macrumors.com\"><span class=\"sitestr\">macrumors.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41700496\">87 points</span> by <a href=\"user?id=Kye\" class=\"hnuser\">Kye</a> <span class=\"age\" title=\"2024-09-30T18:39:50.000000Z\"><a href=\"item?id=41700496\">1 hour ago</a></span> <span id=\"unv_41700496\"></span> | <a href=\"hide?id=41700496&goto=news\">hide</a> | <a href=\"item?id=41700496\">12 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41653148\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">4.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41653148\" href=\"vote?id=41653148&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://phys.org/news/2024-09-extreme-botany-paramotorists-soar-remote.html\">Paramotorists soar across remote Peru desert to collect threatened plants</a><span class=\"sitebit comhead\"> (<a href=\"from?site=phys.org\"><span class=\"sitestr\">phys.org</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41653148\">32 points</span> by <a href=\"user?id=wglb\" class=\"hnuser\">wglb</a> <span class=\"age\" title=\"2024-09-26T00:04:10.000000Z\"><a href=\"item?id=41653148\">4 hours ago</a></span> <span id=\"unv_41653148\"></span> | <a href=\"hide?id=41653148&goto=news\">hide</a> | <a href=\"item?id=41653148\">14 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41697137\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">5.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41697137\" href=\"vote?id=41697137&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"item?id=41697137\">Launch HN: Inkeep (YC W23) – Copilot for Support (think Cursor for help desks)</a></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41697137\">50 points</span> by <a href=\"user?id=engomez\" class=\"hnuser\">engomez</a> <span class=\"age\" title=\"2024-09-30T13:57:38.000000Z\"><a href=\"item?id=41697137\">5 hours ago</a></span> <span id=\"unv_41697137\"></span> | <a href=\"hide?id=41697137&goto=news\">hide</a> | <a href=\"item?id=41697137\">41 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41696046\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">6.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41696046\" href=\"vote?id=41696046&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.marginalia.nu/log/a_111_phrase_matching/\">Phrase matching in Marginalia Search</a><span class=\"sitebit comhead\"> (<a href=\"from?site=marginalia.nu\"><span class=\"sitestr\">marginalia.nu</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41696046\">103 points</span> by <a href=\"user?id=marginalia_nu\" class=\"hnuser\">marginalia_nu</a> <span class=\"age\" title=\"2024-09-30T11:42:55.000000Z\"><a href=\"item?id=41696046\">7 hours ago</a></span> <span id=\"unv_41696046\"></span> | <a href=\"hide?id=41696046&goto=news\">hide</a> | <a href=\"item?id=41696046\">16 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41700394\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">7.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41700394\" href=\"vote?id=41700394&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://arstechnica.com/space/2024/09/engineers-investigate-another-malfunction-on-spacexs-falcon-9-rocket/\">Engineers investigate another malfunction on SpaceX's Falcon 9 rocket</a><span class=\"sitebit comhead\"> (<a href=\"from?site=arstechnica.com\"><span class=\"sitestr\">arstechnica.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41700394\">27 points</span> by <a href=\"user?id=perihelions\" class=\"hnuser\">perihelions</a> <span class=\"age\" title=\"2024-09-30T18:30:05.000000Z\"><a href=\"item?id=41700394\">1 hour ago</a></span> <span id=\"unv_41700394\"></span> | <a href=\"hide?id=41700394&goto=news\">hide</a> | <a href=\"item?id=41700394\">20 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41699730\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">8.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41699730\" href=\"vote?id=41699730&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.gnucash.org/news.phtml\">GnuCash 5.9 Released</a><span class=\"sitebit comhead\"> (<a href=\"from?site=gnucash.org\"><span class=\"sitestr\">gnucash.org</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41699730\">34 points</span> by <a href=\"user?id=moasda\" class=\"hnuser\">moasda</a> <span class=\"age\" title=\"2024-09-30T17:26:03.000000Z\"><a href=\"item?id=41699730\">2 hours ago</a></span> <span id=\"unv_41699730\"></span> | <a href=\"hide?id=41699730&goto=news\">hide</a> | <a href=\"item?id=41699730\">8 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41700517\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">9.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41700517\" href=\"vote?id=41700517&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://launchpointzero.com/blog/product-hunt-isnt-dying-its-become-gentrified/\">Product Hunt isn't dying, it's becoming gentrified</a><span class=\"sitebit comhead\"> (<a href=\"from?site=launchpointzero.com\"><span class=\"sitestr\">launchpointzero.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41700517\">33 points</span> by <a href=\"user?id=padseeker\" class=\"hnuser\">padseeker</a> <span class=\"age\" title=\"2024-09-30T18:42:09.000000Z\"><a href=\"item?id=41700517\">58 minutes ago</a></span> <span id=\"unv_41700517\"></span> | <a href=\"hide?id=41700517&goto=news\">hide</a> | <a href=\"item?id=41700517\">19 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41669747\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">10.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41669747\" href=\"vote?id=41669747&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://vanhunteradams.com/Pico/Galton/Collisions.html\">The Physics of Colliding Balls</a><span class=\"sitebit comhead\"> (<a href=\"from?site=vanhunteradams.com\"><span class=\"sitestr\">vanhunteradams.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41669747\">54 points</span> by <a href=\"user?id=vha3\" class=\"hnuser\">vha3</a> <span class=\"age\" title=\"2024-09-27T12:41:49.000000Z\"><a href=\"item?id=41669747\">7 hours ago</a></span> <span id=\"unv_41669747\"></span> | <a href=\"hide?id=41669747&goto=news\">hide</a> | <a href=\"item?id=41669747\">13 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41699441\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">11.</span></td> <td><img src=\"s.gif\" height=\"1\" width=\"14\"></td> <td class=\"title\"><span class=\"titleline\"><a href=\"https://www.easypost.com/careers\" rel=\"nofollow\">EasyPost (YC S13) Is Hiring</a><span class=\"sitebit comhead\"> (<a href=\"from?site=easypost.com\"><span class=\"sitestr\">easypost.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\">\n <span class=\"age\" title=\"2024-09-30T17:00:48.000000Z\"><a href=\"item?id=41699441\">2 hours ago</a></span> | <a href=\"hide?id=41699441&goto=news\">hide</a> </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41690302\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">12.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41690302\" href=\"vote?id=41690302&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.gov.ca.gov/wp-content/uploads/2024/09/SB-1047-Veto-Message.pdf\">Gavin Newsom vetoes SB 1047</a><span class=\"sitebit comhead\"> (<a href=\"from?site=ca.gov\"><span class=\"sitestr\">ca.gov</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41690302\">712 points</span> by <a href=\"user?id=atlasunshrugged\" class=\"hnuser\">atlasunshrugged</a> <span class=\"age\" title=\"2024-09-29T20:43:32.000000Z\"><a href=\"item?id=41690302\">22 hours ago</a></span> <span id=\"unv_41690302\"></span> | <a href=\"hide?id=41690302&goto=news\">hide</a> | <a href=\"item?id=41690302\">414 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41695756\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">13.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41695756\" href=\"vote?id=41695756&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://apps.apple.com/us/app/crystalclear-sound/id6695723746?mt=12\">Show HN: A macOS app to prevent sound quality degradation on AirPods</a><span class=\"sitebit comhead\"> (<a href=\"from?site=apps.apple.com\"><span class=\"sitestr\">apps.apple.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41695756\">57 points</span> by <a href=\"user?id=mrtksn\" class=\"hnuser\">mrtksn</a> <span class=\"age\" title=\"2024-09-30T11:03:10.000000Z\"><a href=\"item?id=41695756\">6 hours ago</a></span> <span id=\"unv_41695756\"></span> | <a href=\"hide?id=41695756&goto=news\">hide</a> | <a href=\"item?id=41695756\">82 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41671562\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">14.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41671562\" href=\"vote?id=41671562&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.atlasobscura.com/articles/white-strawberry\">The fight to save Chile's white strawberry</a><span class=\"sitebit comhead\"> (<a href=\"from?site=atlasobscura.com\"><span class=\"sitestr\">atlasobscura.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41671562\">45 points</span> by <a href=\"user?id=ofou\" class=\"hnuser\">ofou</a> <span class=\"age\" title=\"2024-09-27T15:20:41.000000Z\"><a href=\"item?id=41671562\">4 hours ago</a></span> <span id=\"unv_41671562\"></span> | <a href=\"hide?id=41671562&goto=news\">hide</a> | <a href=\"item?id=41671562\">10 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41694712\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">15.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41694712\" href=\"vote?id=41694712&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://app.keeptrack.space\">Keep Track: 3D Satellite Toolkit</a><span class=\"sitebit comhead\"> (<a href=\"from?site=keeptrack.space\"><span class=\"sitestr\">keeptrack.space</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41694712\">113 points</span> by <a href=\"user?id=jonbaer\" class=\"hnuser\">jonbaer</a> <span class=\"age\" title=\"2024-09-30T08:10:12.000000Z\"><a href=\"item?id=41694712\">11 hours ago</a></span> <span id=\"unv_41694712\"></span> | <a href=\"hide?id=41694712&goto=news\">hide</a> | <a href=\"item?id=41694712\">30 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41698686\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">16.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41698686\" href=\"vote?id=41698686&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://blog.sequinstream.com/at-most-once-at-least-once-and-exactly-once-delivery/\">No such thing as exactly-once delivery</a><span class=\"sitebit comhead\"> (<a href=\"from?site=sequinstream.com\"><span class=\"sitestr\">sequinstream.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41698686\">15 points</span> by <a href=\"user?id=todsacerdoti\" class=\"hnuser\">todsacerdoti</a> <span class=\"age\" title=\"2024-09-30T16:00:17.000000Z\"><a href=\"item?id=41698686\">3 hours ago</a></span> <span id=\"unv_41698686\"></span> | <a href=\"hide?id=41698686&goto=news\">hide</a> | <a href=\"item?id=41698686\">3 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41695840\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">17.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41695840\" href=\"vote?id=41695840&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://github.com/mediar-ai/screenpipe\">Screenpipe: 24/7 local AI screen and mic recording</a><span class=\"sitebit comhead\"> (<a href=\"from?site=github.com/mediar-ai\"><span class=\"sitestr\">github.com/mediar-ai</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41695840\">142 points</span> by <a href=\"user?id=thunderbong\" class=\"hnuser\">thunderbong</a> <span class=\"age\" title=\"2024-09-30T11:15:36.000000Z\"><a href=\"item?id=41695840\">8 hours ago</a></span> <span id=\"unv_41695840\"></span> | <a href=\"hide?id=41695840&goto=news\">hide</a> | <a href=\"item?id=41695840\">86 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41666269\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">18.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41666269\" href=\"vote?id=41666269&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.historytoday.com/archive/normans-and-slavery-breaking-bonds\">Normans and Slavery: Breaking the Bonds</a><span class=\"sitebit comhead\"> (<a href=\"from?site=historytoday.com\"><span class=\"sitestr\">historytoday.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41666269\">92 points</span> by <a href=\"user?id=pepys\" class=\"hnuser\">pepys</a> <span class=\"age\" title=\"2024-09-27T04:31:27.000000Z\"><a href=\"item?id=41666269\">9 hours ago</a></span> <span id=\"unv_41666269\"></span> | <a href=\"hide?id=41666269&goto=news\">hide</a> | <a href=\"item?id=41666269\">52 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41698823\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">19.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41698823\" href=\"vote?id=41698823&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.newyorker.com/magazine/2024/10/07/dr-calhouns-mousery-lee-alan-dugatkin-book-reviews-rat-city-edmund-ramsden-and-jon-adams\">Two new books on John Calhoun and his rodent experiments</a><span class=\"sitebit comhead\"> (<a href=\"from?site=newyorker.com\"><span class=\"sitestr\">newyorker.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41698823\">67 points</span> by <a href=\"user?id=mitchbob\" class=\"hnuser\">mitchbob</a> <span class=\"age\" title=\"2024-09-30T16:11:52.000000Z\"><a href=\"item?id=41698823\">3 hours ago</a></span> <span id=\"unv_41698823\"></span> | <a href=\"hide?id=41698823&goto=news\">hide</a> | <a href=\"item?id=41698823\">44 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41699323\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">20.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41699323\" href=\"vote?id=41699323&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://github.com/peer-calls/peer-calls\">Peer Calls: WebRTC peer to peer calls for everyone</a><span class=\"sitebit comhead\"> (<a href=\"from?site=github.com/peer-calls\"><span class=\"sitestr\">github.com/peer-calls</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41699323\">37 points</span> by <a href=\"user?id=yamrzou\" class=\"hnuser\">yamrzou</a> <span class=\"age\" title=\"2024-09-30T16:51:48.000000Z\"><a href=\"item?id=41699323\">2 hours ago</a></span> <span id=\"unv_41699323\"></span> | <a href=\"hide?id=41699323&goto=news\">hide</a> | <a href=\"item?id=41699323\">11 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41694504\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">21.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41694504\" href=\"vote?id=41694504&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://ngrok.com/blog-post/how-we-built-ngroks-data-platform\">How we built ngrok's data platform</a><span class=\"sitebit comhead\"> (<a href=\"from?site=ngrok.com\"><span class=\"sitestr\">ngrok.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41694504\">115 points</span> by <a href=\"user?id=samber\" class=\"hnuser\">samber</a> <span class=\"age\" title=\"2024-09-30T07:35:01.000000Z\"><a href=\"item?id=41694504\">12 hours ago</a></span> <span id=\"unv_41694504\"></span> | <a href=\"hide?id=41694504&goto=news\">hide</a> | <a href=\"item?id=41694504\">32 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41696560\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">22.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41696560\" href=\"vote?id=41696560&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://afewthingz.com/browserbookmark\">The best browser bookmarking system is files</a><span class=\"sitebit comhead\"> (<a href=\"from?site=afewthingz.com\"><span class=\"sitestr\">afewthingz.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41696560\">67 points</span> by <a href=\"user?id=josephernest\" class=\"hnuser\">josephernest</a> <span class=\"age\" title=\"2024-09-30T12:51:44.000000Z\"><a href=\"item?id=41696560\">6 hours ago</a></span> <span id=\"unv_41696560\"></span> | <a href=\"hide?id=41696560&goto=news\">hide</a> | <a href=\"item?id=41696560\">69 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41693979\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">23.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41693979\" href=\"vote?id=41693979&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://rodneybrooks.com/tips-for-building-and-deploying-robots/\">Tips for Building and Deploying Robots</a><span class=\"sitebit comhead\"> (<a href=\"from?site=rodneybrooks.com\"><span class=\"sitestr\">rodneybrooks.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41693979\">82 points</span> by <a href=\"user?id=dannyobrien\" class=\"hnuser\">dannyobrien</a> <span class=\"age\" title=\"2024-09-30T05:55:51.000000Z\"><a href=\"item?id=41693979\">13 hours ago</a></span> <span id=\"unv_41693979\"></span> | <a href=\"hide?id=41693979&goto=news\">hide</a> | <a href=\"item?id=41693979\">16 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41698995\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">24.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41698995\" href=\"vote?id=41698995&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://github.com/bndr/pipreqs\">Generate pip requirements.txt file based on imports of any project</a><span class=\"sitebit comhead\"> (<a href=\"from?site=github.com/bndr\"><span class=\"sitestr\">github.com/bndr</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41698995\">95 points</span> by <a href=\"user?id=mooreds\" class=\"hnuser\">mooreds</a> <span class=\"age\" title=\"2024-09-30T16:26:13.000000Z\"><a href=\"item?id=41698995\">3 hours ago</a></span> <span id=\"unv_41698995\"></span> | <a href=\"hide?id=41698995&goto=news\">hide</a> | <a href=\"item?id=41698995\">57 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41688469\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">25.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41688469\" href=\"vote?id=41688469&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://mundraub.org/map\">Map with public fruit trees</a><span class=\"sitebit comhead\"> (<a href=\"from?site=mundraub.org\"><span class=\"sitestr\">mundraub.org</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41688469\">310 points</span> by <a href=\"user?id=dschuessler\" class=\"hnuser\">dschuessler</a> <span class=\"age\" title=\"2024-09-29T16:29:36.000000Z\"><a href=\"item?id=41688469\">1 day ago</a></span> <span id=\"unv_41688469\"></span> | <a href=\"hide?id=41688469&goto=news\">hide</a> | <a href=\"item?id=41688469\">131 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41693087\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">26.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41693087\" href=\"vote?id=41693087&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://simonwillison.net/2024/Sep/29/notebooklm-audio-overview/\">NotebookLM's automatically generated podcasts are surprisingly effective</a><span class=\"sitebit comhead\"> (<a href=\"from?site=simonwillison.net\"><span class=\"sitestr\">simonwillison.net</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41693087\">765 points</span> by <a href=\"user?id=simonw\" class=\"hnuser\">simonw</a> <span class=\"age\" title=\"2024-09-30T02:58:02.000000Z\"><a href=\"item?id=41693087\">16 hours ago</a></span> <span id=\"unv_41693087\"></span> | <a href=\"hide?id=41693087&goto=news\">hide</a> | <a href=\"item?id=41693087\">390 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41696434\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">27.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41696434\" href=\"vote?id=41696434&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.sciencedaily.com/releases/2024/09/240905120923.htm\">New research on anesthesia and microtubules gives new clues about consciousness</a><span class=\"sitebit comhead\"> (<a href=\"from?site=sciencedaily.com\"><span class=\"sitestr\">sciencedaily.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41696434\">121 points</span> by <a href=\"user?id=isaacfrond\" class=\"hnuser\">isaacfrond</a> <span class=\"age\" title=\"2024-09-30T12:34:46.000000Z\"><a href=\"item?id=41696434\">7 hours ago</a></span> <span id=\"unv_41696434\"></span> | <a href=\"hide?id=41696434&goto=news\">hide</a> | <a href=\"item?id=41696434\">142 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41698361\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">28.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41698361\" href=\"vote?id=41698361&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://www.liquid.ai/liquid-foundation-models\">Liquid Foundation Models: Our First Series of Generative AI Models</a><span class=\"sitebit comhead\"> (<a href=\"from?site=liquid.ai\"><span class=\"sitestr\">liquid.ai</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41698361\">158 points</span> by <a href=\"user?id=jasondavies\" class=\"hnuser\">jasondavies</a> <span class=\"age\" title=\"2024-09-30T15:33:30.000000Z\"><a href=\"item?id=41698361\">4 hours ago</a></span> <span id=\"unv_41698361\"></span> | <a href=\"hide?id=41698361&goto=news\">hide</a> | <a href=\"item?id=41698361\">125 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41688018\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">29.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41688018\" href=\"vote?id=41688018&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://gitlab.com/zephray/sitina1\">Sitina1 Open-Source Camera</a><span class=\"sitebit comhead\"> (<a href=\"from?site=gitlab.com/zephray\"><span class=\"sitestr\">gitlab.com/zephray</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41688018\">307 points</span> by <a href=\"user?id=zdw\" class=\"hnuser\">zdw</a> <span class=\"age\" title=\"2024-09-29T15:27:54.000000Z\"><a href=\"item?id=41688018\">1 day ago</a></span> <span id=\"unv_41688018\"></span> | <a href=\"hide?id=41688018&goto=news\">hide</a> | <a href=\"item?id=41688018\">117 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"athing\" id=\"41691943\">\n <td align=\"right\" valign=\"top\" class=\"title\"><span class=\"rank\">30.</span></td> <td valign=\"top\" class=\"votelinks\"><center><a id=\"up_41691943\" href=\"vote?id=41691943&how=up&goto=news\"><div class=\"votearrow\" title=\"upvote\"></div></a></center></td><td class=\"title\"><span class=\"titleline\"><a href=\"https://benn.substack.com/p/do-ai-companies-work\">Do AI companies work?</a><span class=\"sitebit comhead\"> (<a href=\"from?site=benn.substack.com\"><span class=\"sitestr\">benn.substack.com</span></a>)</span></span></td></tr><tr><td colspan=\"2\"></td><td class=\"subtext\"><span class=\"subline\">\n <span class=\"score\" id=\"score_41691943\">171 points</span> by <a href=\"user?id=herbertl\" class=\"hnuser\">herbertl</a> <span class=\"age\" title=\"2024-09-29T23:44:57.000000Z\"><a href=\"item?id=41691943\">19 hours ago</a></span> <span id=\"unv_41691943\"></span> | <a href=\"hide?id=41691943&goto=news\">hide</a> | <a href=\"item?id=41691943\">177 comments</a> </span>\n </td></tr>\n <tr class=\"spacer\" style=\"height:5px\"></tr>\n <tr class=\"morespace\" style=\"height:10px\"></tr><tr><td colspan=\"2\"></td>\n <td class=\"title\"><a href=\"?p=2\" class=\"morelink\" rel=\"next\">More</a></td> </tr>\n </tbody></table>\n</td></tr>\n<tr><td><img src=\"s.gif\" height=\"10\" width=\"0\"><table width=\"100%\" cellspacing=\"0\" cellpadding=\"1\"><tbody><tr><td bgcolor=\"#ff6600\"></td></tr></tbody></table><br>\n<center><span class=\"yclinks\"><a href=\"newsguidelines.html\">Guidelines</a> | <a href=\"newsfaq.html\">FAQ</a> | <a href=\"lists\">Lists</a> | <a href=\"https://github.com/HackerNews/API\">API</a> | <a href=\"security.html\">Security</a> | <a href=\"https://www.ycombinator.com/legal/\">Legal</a> | <a href=\"https://www.ycombinator.com/apply/\">Apply to YC</a> | <a href=\"mailto:hn@ycombinator.com\">Contact</a></span><br><br>\n<form method=\"get\" action=\"//hn.algolia.com/\">Search: <input type=\"text\" name=\"q\" size=\"17\" autocorrect=\"off\" spellcheck=\"false\" autocapitalize=\"off\" autocomplete=\"off\"></form></center></td></tr> </tbody></table></center>\n <script type=\"text/javascript\" src=\"hn.js?YGXVdxEPU89UzYvgeaVU\"></script>\n \n</body></html>",
role: "user",
}
"{\"model\":\"llama3.1\",\"created_at\":\"2024-09-30T19:43:24.5375229Z\",\"message\":{\"role\":\"assistant\",\"content\":\"{ \\\"title\\\": \\\"Sitina1 Open-Source Camera\\\", \\\"url\\\": \\\"https://gitlab.com/zephray/sitina1\\\", \\\"score\\\": 307, \\\"user\\\": \\\"zdw\\\", \\\"time\\\": \\\"2024-09-29T15:27:54.000000Z\\\" }\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \\n\\n\\n\\n\\n\\n \"},\"done\":false}"
Hi, i tried the example code to see if the scraper works but it always return a validation error for attribute
top
which is supposed ton be an array.here are my example code, a bit tweaked to use local ollama :
the error log :
the value seems to be returned, but not as top and an array,