Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: JS Local-only AI Apps starter kit: cost $0 to run and test locally (github.com/ykhli)
11 points by ykhli on Oct 31, 2023 | hide | past | favorite | 2 comments
Hi HN! Here's a local-only stack I built over the weekend - hope it can be useful for you!

I have been building a lot of AI apps - https://github.com/a16z-infra/ai-town https://github.com/a16z-infra/companion-app ...

And there were definitely times I spent way too much $$ before deploying the app to production. So I was looking for a "local only" stack and found a few tools that worked well together. I used the following set of tools but may add more options later:

- Inference: Ollama

- VectorDB: Supabase pg-vector

- LLM orchestration: langchain

- Framework: nextjs

My learning from building ai-town was also that many people don'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.

Hope this can lower the barrier to entry for building AI apps. :)




very cool that you used supabase for this yoko - thank you.

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's a sensible default.

also it's worth mentioning that the gte-small[2] embedding model isn't great with non-english embeddings. I don't know if many developers will get tripped up on that, but hopefully it's clear that they can swap that for any huggingface model

[0] https://github.com/ykhli/local-ai-stack/blob/main/supabase/m...

[1] https://github.com/pgvector/pgvector#ivfflat

[2] https://github.com/ykhli/local-ai-stack/blob/1a23061442ce1d9...


These are great suggestions!! Really appreciate it. Let me open a few PRs and add you to review :D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: