TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: JS Local-only AI Apps starter kit: cost $0 to run and test locally

11 pointsby ykhliover 1 year ago
Hi HN! Here&#x27;s a local-only stack I built over the weekend - hope it can be useful for you!<p>I have been building a lot of AI apps - <a href="https:&#x2F;&#x2F;github.com&#x2F;a16z-infra&#x2F;ai-town">https:&#x2F;&#x2F;github.com&#x2F;a16z-infra&#x2F;ai-town</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;a16z-infra&#x2F;companion-app">https:&#x2F;&#x2F;github.com&#x2F;a16z-infra&#x2F;companion-app</a> ...<p>And there were definitely times I spent way too much $$ before deploying the app to production. So I was looking for a &quot;local only&quot; stack and found a few tools that worked well together. I used the following set of tools but may add more options later:<p>- Inference: Ollama<p>- VectorDB: Supabase pg-vector<p>- LLM orchestration: langchain<p>- Framework: nextjs<p>My learning from building ai-town was also that many people don&#x27;t have the luxury of swiping a credit card to test an app with a lot of AI workloads -- not surprisingly, many models on Ollama are already very good - I used llama2-7b for majority of my dev work.<p>Hope this can lower the barrier to entry for building AI apps. :)

1 comment

kiwicoppleover 1 year ago
very cool that you used supabase for this yoko - thank you.<p>it could be worthwile adding an an index to the migration script[0]. if you decide to do this, it will need to be HNSW since ivfflat indexes should be created _after_ the table has some data[1]. HNSW is faster as well, so it&#x27;s a sensible default.<p>also it&#x27;s worth mentioning that the gte-small[2] embedding model isn&#x27;t great with non-english embeddings. I don&#x27;t know if many developers will get tripped up on that, but hopefully it&#x27;s clear that they can swap that for any huggingface model<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;ykhli&#x2F;local-ai-stack&#x2F;blob&#x2F;main&#x2F;supabase&#x2F;migrations&#x2F;20231028002341_create_vector_db.sql">https:&#x2F;&#x2F;github.com&#x2F;ykhli&#x2F;local-ai-stack&#x2F;blob&#x2F;main&#x2F;supabase&#x2F;m...</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;pgvector&#x2F;pgvector#ivfflat">https:&#x2F;&#x2F;github.com&#x2F;pgvector&#x2F;pgvector#ivfflat</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;ykhli&#x2F;local-ai-stack&#x2F;blob&#x2F;1a23061442ce1d98981f0f3af83f2cbbc2ed5c18&#x2F;supabase&#x2F;functions&#x2F;embed&#x2F;index.ts#L15">https:&#x2F;&#x2F;github.com&#x2F;ykhli&#x2F;local-ai-stack&#x2F;blob&#x2F;1a23061442ce1d9...</a>
评论 #38090062 未加载