{"id":362,"date":"2024-11-22T19:51:28","date_gmt":"2024-11-22T11:51:28","guid":{"rendered":"https:\/\/neolefty.org\/wordpress\/?p=362"},"modified":"2024-11-22T20:02:34","modified_gmt":"2024-11-22T12:02:34","slug":"llms-as-a-component","status":"publish","type":"post","link":"https:\/\/neolefty.org\/wordpress\/2024\/11\/22\/llms-as-a-component\/","title":{"rendered":"LLMs as a component"},"content":{"rendered":"\n<p>Source code: <a href=\"https:\/\/github.com\/neolefty\/madlibs\">github.com\/neolefty\/madlibs<\/a>.<\/p>\n\n\n\n<p>Large Language Models are everywhere, and programmers <a href=\"https:\/\/youtu.be\/wRLTfC_PMKU?si=oa460J_UKj3S7NJh\">should all be trying them out<\/a>. So here&#8217;s a really simple app!<\/p>\n\n\n\n<iframe loading=\"lazy\" id=\"benchmarks\" title=\"Fill in the Blanks\" width=\"100%\" height=\"750px\" src=\"https:\/\/fillinblanks.netlify.app\"><\/iframe>\n\n\n\n<p class=\"has-text-align-center\"><a href=\"https:\/\/fillinblanks.netlify.app\/\"><em>full screen view<\/em><\/a><\/p>\n\n\n\n<p>It&#8217;s just a chat UI with two additions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A framing prompt, basically \u201cRespond with <a href=\"https:\/\/madlibs.com\/\">Mad Libs<\/a>, formatted so I can process them,\u201d and<\/li>\n\n\n\n<li>Some text substitution from inputs.<\/li>\n<\/ul>\n\n\n\n<p>A framework can really help. This app uses <a href=\"https:\/\/sdk.vercel.ai\/\">Vercel\u2019s AI SDK<\/a>,\u00a0a TypeScript library specialized for building interactive web applications. Another good one, which has both Python and JavaScript versions, is <a href=\"https:\/\/python.langchain.com\/docs\/concepts\/\">LangChain<\/a> \/ <a href=\"https:\/\/langchain-ai.github.io\/langgraph\/\">LangGraph<\/a> \u2014 for building \u201cApplications that can reason\u201d.<\/p>\n\n\n\n<p>So simple it\u2019s embarrassing. A good place to start, right?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bugs<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sometimest the streaming response gets cut off. That may be because of bugs in <a href=\"https:\/\/opennext.js.org\/\">OpenNext<\/a>. It never fails in development \u2014&nbsp;I should really see how it does when hosted at <a href=\"https:\/\/vercel.com\/\">Vercel<\/a> instead.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Source code: github.com\/neolefty\/madlibs. Large Language Models are everywhere, and programmers should all be trying them out. So here&#8217;s a really simple app! full screen view It&#8217;s just a chat UI with two additions: A framework can really help. This app &hellip; <a href=\"https:\/\/neolefty.org\/wordpress\/2024\/11\/22\/llms-as-a-component\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,11],"tags":[],"class_list":["post-362","post","type-post","status-publish","format-standard","hentry","category-bedtime-story","category-techno-biological"],"_links":{"self":[{"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/posts\/362","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/comments?post=362"}],"version-history":[{"count":5,"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/posts\/362\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/posts\/362\/revisions\/367"}],"wp:attachment":[{"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/media?parent=362"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/categories?post=362"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neolefty.org\/wordpress\/wp-json\/wp\/v2\/tags?post=362"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}