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

Autocomplete: Only ever complete a single line in single-line mode and reduce the output token limit #344

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

philipp-spiess
Copy link
Contributor

Ensure that single-line mode completions are only ever returning a single line.

Since we no longer have two lines, I thought it's also okay to decrease the response token limit a bit. While there's still some variations, this seems to make it much more common for me when testing to get sub 800ms responses (compared to ~1sec before). I wasn't able to find an instance where 60 tokens weren't enough for single line completions yet.

Test plan

Updated test suite. Tested the latency locally.

@philipp-spiess philipp-spiess requested review from beyang, vovakulikov and a team and removed request for beyang July 21, 2023 08:46
@@ -22,6 +22,7 @@ Starting from `0.2.0`, Cody is using `major.EVEN_NUMBER.patch` for release versi

- Exclude context for chat input with only one word. [pull/279](https://github.com/sourcegraph/cody/pull/279)
- [Internal Only] `Custom Recipe`: Store `cody.json` file for user recipes within the `.vscode` folder located in the $HOME directory. [pull/279](https://github.com/sourcegraph/cody/pull/279)
- Various autocomplete improvements. [pull/344](https://github.com/sourcegraph/cody/pull/344)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: is there a reason we switched from the format #344 to pull/344?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, I think when we created the VS Code change log file we always had this format haha. I find it slightly more convenient because I can use multi-cursor to change both numbers at the same time when I commit before I create the PR. 🤷

Copy link
Contributor

@vdavid vdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me and the code looks good; nice and simple.

@philipp-spiess philipp-spiess merged commit 8207e09 into main Jul 21, 2023
6 checks passed
@philipp-spiess philipp-spiess deleted the ps/autocomplete-single-line-always-one-line branch July 21, 2023 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants