Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Autocomplete on VsCode seems not work in the right line #1258

Open
3 tasks done
RedIce007 opened this issue May 10, 2024 · 1 comment
Open
3 tasks done

The Autocomplete on VsCode seems not work in the right line #1258

RedIce007 opened this issue May 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@RedIce007
Copy link

Before submitting your bug report

Relevant environment info

- OS:win10
- Continue:v0.8.27
- IDE:VSCode 1.89.0

Description

I add new line at first bold place
but the completion(latatic) seems based on second bold place which is completely irrelevant with my input

here is the code

int hcos_get_usage(const pid_t pid, __uint64_t seconds, HCOS_USAGE *usage)
{
*****
*****
usage->status = fstat.processStatus;
usage->cpuUsage = (sstat.processTotoalTime - fstat.processTotoalTime) /
(sstat.cpuTotalTime - fstat.cpuTotalTime);
usage->memUsage = fstat.rss;
usage->fdUsage = fd_count;
usage free(fd_list_iter->fdnext);
return 0;
}

int hcos_check_fd(const pid_t pid, char *file_path, __uint64_t *max_counts)
{
******
total 85 line
******
for (struct fdinfo *fd_list_iter = fd_list_head; fd_list_iter != NULL; fd_list_iter = fd_list_head)
{
fd_list_head = fd_list_head->fdnext;
free(fd_list_iter);
}
******
return 0;
}

To reproduce

1.setup local ollama
2.config continue

{
"title": "ollama",
"model": "llama3",
"completionOptions": {},
"apiBase": "http://172.18.16.72:11434",
"provider": "ollama"
}
],
"customCommands": [
{
"name": "test",
"prompt": "{{{ input }}}\n\nWrite a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
"description": "Write unit tests for highlighted code"
}
],
"tabAutocompleteModel": {
"title": "Llama3",
"provider": "ollama",
"model": "llama3",
"apiBase": "http://172.18.16.72:11434"
},
"tabAutocompleteOptions": {
"maxPromptTokens": 4000
},
"allowAnonymousTelemetry": true,
"contextProviders": [
{
"name": "code",
"params": {}
},
{
"name": "docs",
"params": {}
}

3.enable auto completion
4.write the code and wait completion

Log output

No recent errors in log console.
@RedIce007 RedIce007 added the bug Something isn't working label May 10, 2024
@RedIce007 RedIce007 changed the title The Autocomplete on VsCode seems not woke in the right line The Autocomplete on VsCode seems not work in the right line May 10, 2024
@sestinj
Copy link
Contributor

sestinj commented May 20, 2024

@RedIce007 there is a chance that this happens because the model being used is Llama 3, which was not trained for tab-autocomplete. I would recommend trying starcoder2:3b, which is trained on a "Fill in the middle" format. See here for a related explanation of why this is important

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants