OpenAI provider that sends requests though sourcegraph server#875
Conversation
|
@philipp-spiess do you have any suggestions here, from the testing I've done I have been getting reasonable single and multiline autocompletes most of the time. I'm not sure if I want to replace the existing provider or add another one since there may be some trialing the current one. |
philipp-spiess
left a comment
There was a problem hiding this comment.
Looks good overall - Pretty much like what we do for Fireworks now too. I don't really have any advice, if you think it would make sense to have a separate provider while we're transitioning, I don't see a problem with that either
There was a problem hiding this comment.
This is now defined twice: once here and once in the createProvider as a default.
There was a problem hiding this comment.
What's the model that is running? Do we know that on the client? This logging is mostly for Fireworks where we can run multiple models though so don't worry about it.
There was a problem hiding this comment.
The model name will be customer specific it's whatever they name it when they create it in azure. So I just threw a place holder in there. I think we will document that we've tested against gpt-35-turbo so maybe that is a better placeholder.
There was a problem hiding this comment.
The values here have changed a lot, was this on purpose?
There was a problem hiding this comment.
Not intentional I copied a bunch over from the fireworks provider based on a comment you made on the original pr about making the prompt similar and didn't notice those values were different.
Thank you. Any concerns if I call this the |
2ea2cef to
ac8b8b2
Compare
## Changes Fixes sourcegraph/jetbrains#610 `ActionUpdateThread.OLD_EDT is deprecated and going to be removed soon` Why we get that issue? https://plugins.jetbrains.com/docs/intellij/basic-action-system.html#principal-implementation-overrides https://github.com/JetBrains/intellij-community/blob/idea/233.14475.28/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/ActionUpdateThread.java New API was become required in 2024 EAP, and every IntelliJ `Action` must define if `update` should be running on `EDT` or `BGT` thread. Unfortunately that API was not present before `2022.2`, so we need to upgrade a bit. ## Test plan This change requires full manual QA
Adds a new openai provider that routes requests though the sourcegraph instance. Currently this reuses the prompt logic from the unstabl-azure-openai provider. This should enable working though the sg backend and then any prompt updates can be handled separately.
Test plan
ran locally with https://github.com/sourcegraph/sourcegraph/pull/56063