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
16.5k stars 1.29k forks source link

have addition "<COMPLETION>" in every autocomplition #1420

Open art-solutions opened 3 months ago

art-solutions commented 3 months ago

Before submitting your bug report

Relevant environment info

- OS: win10
- Continue: 
- IDE: VS

when i use auto completion i have always this "<COMPLETION>" in every completion ..plz help me the have clean completion without this "<COMPLETION>" 
example "
print<COMPLETION>(df.describe())
<COMPLETION>df.hist(figsize=(10, 8))
plt.show()<COMPLETION>plt.savefig('histogram.png')
<COMPLETION>plt.close()"

Description

i have always this "" in every completion

To reproduce

No response

Log output

No response

simseb commented 3 months ago

Me too on Ubuntu 22.04/VSCode with 0.8.24 - 2024-04-12

mtrevin93 commented 3 months ago

I am seeing this too. My autocomplete Ex:

const PRIMESTOTWOHUNDRED = {{FILL_HERE}}
</QUERY>
TASK: Fill the {{FILL_HERE}} hole. Answer only with the CORRECT completion, and NOTHING ELSE. Do it now.
<COMPLETION>==========================================================================
==========================================================================
Completion:

<COMPLETION>[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]

We are using an anthropic model bedrock/anthropic.claude-3-sonnet-20240229-v1:0 Our API Proxy has to strip out /n and /r from the response, but then the completion tag is not trimmed out because it is not on a new line.

joewinke commented 3 months ago

me four - infront of every suggestion.

sestinj commented 3 months ago

@joewinke @simseb @mtrevin93 I've made the necessary fix here (https://github.com/continuedev/continue/commit/f97573e77ee3f7073142ceca9da30a7de07562d0), but if at all possible I strongly recommend avoiding GPT-4/Claude for autocompletion. These models were not trained for the task, and as a result we have to do a significant level of gymnastics to convince them to output something in a reasonable format.

If you have the opportunity to switch, I would recommend Codestral, which is free until August, and will be much, much cheaper than GPT-4/Claude even after that.

joewinke commented 3 months ago

@sestinj thank you! I was able to get a codestral key and get it working by adding it to my config.json as the autocomplete model. I restarted the extension and I think its better but I'm still getting lots of but not on every suggestion, but its my impression and I'm not sure if its better.

Maybe its better on auto complete, but for chat about code, GPT-4o seems to be much better: Codestral: Screenshot 2024-06-17 at 12 17 15 AM GPT-4o: Screenshot 2024-06-17 at 12 22 43 AM

Do we need to wait for your fix to get PR'd into the main release and then update? Thanks again @sestinj

sestinj commented 3 months ago

@joewinke You are absolutely right that GPT-4o is better for chat

The update for stripping the \<COMPLETION> tags will likely be released to the pre-release version (0.9.x) tomorrow

ilyanoskov commented 3 months ago

Seeing this issue in 0.50.0 Jetbrains release, and the latest vscode release does not have this issue anymore

cxzlw commented 2 months ago

@joewinke You are absolutely right that GPT-4o is better for chat

The update for stripping the tags will likely be released to the pre-release version (0.9.x) tomorrow

Hi, I am using a provider which doesn't follow stop-words. Therefore addition </COMPLETION> still exists in most autocompletions. The pre-release version removes <COMPLETION> well. But could you add the filter to remove </COMPLETION> too? Thanks!

image