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: hacky gpt-4o support #4182

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

valerybugakov
Copy link
Member

@valerybugakov valerybugakov commented May 15, 2024

Hacky GPT-4o autocomplete support.

Test plan

  1. Add "cody.autocomplete.advanced.provider": "unstable-openai" to your user settings.
  2. Start Cody Gateway locally from this branch Cody Gateway: hacky autocomplete gpt-4o support sourcegraph#62693.
  3. Login to the local SG instance.
  4. Use autocomplete.

Comment on lines +172 to +182
<examples>
${PromptString.join(
examplesArray.map(example => {
return ps`
<example>
H: <existing_code>
${example.example}
</existing_code>

A: ${example.response}
</example>
Copy link
Contributor

Choose a reason for hiding this comment

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

Intuitively I'd say we could model examples in different user/assistant responses to avoid some of the overhead here, i.e like I do here: https://github.com/sourcegraph/cody/blob/main/vscode/src/supercompletions/prompt.ts#L53-L112

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice! I didn't spend any time tweaking the prompt. We should definitely change it if we want to ship this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants