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: Mark Ollama support experimental #3077

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

philipp-spiess
Copy link
Contributor

@philipp-spiess philipp-spiess commented Feb 7, 2024

Test plan

  • Try with both "cody.autocomplete.advanced.provider": "unstable-ollama" and "cody.autocomplete.advanced.provider": "experimental-ollama"in the settings
  • Check that it resolves to the correct provider by logging:
    █ CodyCompletionProvider:initialized: experimental-ollama/deepseek-coder:6.7b-base-q4_K_M
    
Screenshot 2024-02-07 at 20 21 37

Copy link
Contributor

@abeatrix abeatrix left a comment

Choose a reason for hiding this comment

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

Left a non blocker question inline. lgtm

if (autocompleteAdvancedProvider === 'unstable-fireworks') {
autocompleteAdvancedProvider = 'fireworks'
let autocompleteAdvancedProvider = config.get<
Configuration['autocompleteAdvancedProvider'] | 'unstable-ollama' | 'unstable-fireworks'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we set the default value to experimental-ollama as true if unstable-ollama is available, so that we don't have to check for both names in the code repeatedly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure I follow but isn't this exactly happening here? only experimental-ollama is supported but here we handle unstable-ollama explicitly in just one area: https://github.com/sourcegraph/cody/pull/3077/files/89672b78997a6d8dbc58dd354afa8247fab8a4e8#diff-85c89382076aeb49c8645dd41e6422552fba7bbf25575701c1a9253027164a76R62-R63

😅

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh i mean to replace the null in (CONFIG_KEY.autocompleteAdvancedProvider, null) with experimental-ollama if unstable-ollama is available so you don't have to check for both in create-provider?

case 'experimental-ollama':
case 'unstable-ollama': {

Copy link
Contributor

Choose a reason for hiding this comment

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

oh my diff view got cut off, i saw what you meant now lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh gotcha the null is actually or the case when no provider is set and needs to work too, independent of this change

@philipp-spiess philipp-spiess merged commit 726828c into main Feb 7, 2024
16 checks passed
@philipp-spiess philipp-spiess deleted the ps/ac-mark-ollama-experimental branch February 7, 2024 19:43
dominiccooney added a commit to sourcegraph/jetbrains that referenced this pull request Apr 25, 2024
- `fireworks` became stable in sourcegraph/cody#1363
- `unstable-codegen` was removed in sourcegraph/cody#1364
- `unstable-ollama` was renamed to `experimental-ollama` in
sourcegraph/cody#3077

## Test plan

Tested manually:

```
echo 'cody.autocomplete.advanced.provider=fireworks' > ~/.sourcegraph-jetbrains.properties
```

Open a file and generate an autocompletion. The Cody log should contain:
`CodyCompletionProvider:initialized: fireworks/starcoder-hybrid`
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