Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heaversm/llamafile-code-completion
Use llamafile to generate inline code completions in react / next.js apps.
https://github.com/heaversm/llamafile-code-completion
Last synced: about 2 months ago
JSON representation
Use llamafile to generate inline code completions in react / next.js apps.
- Host: GitHub
- URL: https://github.com/heaversm/llamafile-code-completion
- Owner: heaversm
- Created: 2024-11-21T21:18:00.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-21T21:44:06.000Z (about 2 months ago)
- Last Synced: 2024-11-21T22:30:02.551Z (about 2 months ago)
- Language: TypeScript
- Size: 188 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Llamafile Code Completion App
This app is a demo of using [Mozilla's Llamafile](https://github.com/Mozilla-Ocho/llamafile) to do inline code completion within a web app using a free, locally running AI model.
## Getting Started
Download an AI model in Llamafile format, for example [deepseek-coder](https://huggingface.co/raincoder/deepseek-coder-1.3b-llamafile/tree/main). Make sure the model has a llamafile extension, is not an "instruct" model, and supports FIM (fill in the middle) code completion.
Then, open a terminal to wherever you downloaded your llamafile to, and run: `./[name_of_model].llamafile --nobrowser --server`.
Then run `npm install`
Then, run the development server: `npm run dev`.
Open [http://localhost:3000](http://localhost:3000) with your browser to see the app.
You can edit the app from the `app/components/CodeCompletionApp.tsx` file.