lmg-anon / mikupad

LLM Frontend in a single html file
https://lmg-anon.github.io/mikupad/mikupad.html
Creative Commons Zero v1.0 Universal
175 stars 24 forks source link

Implement basic fill-in-the-middle support #63

Closed lmg-anon closed 1 month ago

lmg-anon commented 1 month ago

This allows prediction from any arbitrary position in the text, currently it will predict until the next character is reached.

https://github.com/lmg-anon/mikupad/assets/139719567/ecb713bc-26b3-402b-8d2c-6d76db9b9cc6

https://github.com/lmg-anon/mikupad/assets/139719567/0da602bf-b237-4f73-82e8-fb7eb976dfec

lmg-anon commented 1 month ago

This looks good to merge now. The only issues are that undo/redo won't work for the fill-in-the-middle tokens until https://github.com/lmg-anon/mikupad/pull/66 gets merged. Also, switching tokens doesn't support fill-in-the-middle tokens yet, so I disabled it for them. To be honest, I'm not sure how to implement this, but I think it can be addressed later.