continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
18.34k stars 1.49k forks source link

Add CodeGeeX4 code completion support #1742

Open milkowski opened 3 months ago

milkowski commented 3 months ago

Validations

Problem

It is new quite universal code LLM with code completion which has prompt template not supported by Continue.

Solution

The exact FIM template is described here: https://github.com/THUDM/CodeGeeX4/blob/main/guides/Infilling_guideline.md

michael-wettach commented 3 months ago

Actually I tested it today and was able to use codegeex for code completion with Continue and got quite nice results. There may be issues that I have not yet seen, of course.

One weird thing I noticed: after accepting a suggestion with tab, another suggestion appears in the same code line and even without a space after the last generated word. However, I was able to reproduce that behaviour with codellama, so it does not seem to be related to codegeex alone.

milkowski commented 3 months ago

It somehow works, but if you try how it behaves in native CodeGeeX extension, which uses mentioned template, then it behaves much better and provides completion even with additional surroundings (complementary brackets and proper syntax closing tokens).