-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chat: waitlist for OpenAI-o1 & OpenAI-o1 mini (#5508)
CLOSE https://linear.app/sourcegraph/issue/CODY-3681/improve-support-for-previewexperimental-models Related to sourcegraph/sourcegraph#323 - Added `OpenAI o1` and `OpenAI o1 mini` to dropdown list where users can join the waitlist - Clicking on `Join Waitlist` will open the blog post, fire a telemetry event called `cody.joinLlmWaitlist` and update the `Join Waitlist` label to `On Waitlist` - Added a new `ModelTag.StreamDisabled` tag to indicate models that do not support streaming - Updated the `AssistantMessageCell` and `HumanMessageEditor` components to handle models without streaming support - Displayed a message to the user when a non-streaming model is used - Filtered out the initial codebase context when using a non-streaming model to avoid longer processing times - Display `Try again with a different model` instead of `Try again with different context` below each assistant response - Updated the `ModelSelectField` component to display an "Early Access" badge for models with the `ModelTag.Preview` tag - Expanded the `ModelRef` interface and `ModelsService` to better handle model ID matching - Adds the ability to duplicate the current chat session in the Cody chat interface. - When the "Try again with a different model" button is clicked, a new chat session is created that is a copy of the current session, allowing the user to resubmit their request with a different model. - The changes include: - Adding a new `chatSession` command to the webview message protocol, with `duplicate` and `new` actions - Implementing the `duplicateSession` method in the `ChatController` to create a new session with a unique ID based on the current session - Updating the `ContextFocusActions` component to use the new `chatSession` command when the "Try again with a different model" button is clicked - Models with the `ModelTag.StreamDisabled` tag will no longer display the initial codebase context to avoid longer processing times. - Updated the current `OpenAI o1` and `OpenAI o1 mini` models to use the stable version instead of `-latest` versions - Fix the model provider logo not matching issue ## Test plan <!-- Required. See https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles. --> ![image](https://github.com/user-attachments/assets/172810a8-2a44-4062-a808-81b7476460e5) Build from this branch and verify the following in your debug modes: 1. `OpenAI o1` & `OpenAI o1 mini` are added to the model dropdown list 2. These models have the `Join Waitlist` label 3. Clicking on one of the model will open a webpage in browser 4. The `Join Waitlist` label now turned to `On Waitlist` ![image](https://github.com/user-attachments/assets/2f67f24f-c68c-4595-9696-7f65d78eb566) When using these models: 1. When submitting a question using one of these models, you will see `Model without streaming support takes longer to response.` when waiting for the LLM response 1. You should not find `Try again with different context` underneath the LLM response when using these models. 1. You should see `Try again with a different model` instead 1. Verify that when the "Try again with a different model" button is clicked, a new chat session is created that is a copy of the current session, and the user is able to resubmit their request with a different model. ## Changelog <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c --> feat(chat): add support for preview models `Gemini 1.5 Pro Latest` & `Gemini 1.5 Flash Latest` feat(chat): Added ability to duplicate chat sessions
- Loading branch information
Showing
22 changed files
with
358 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ings/kotlin/lib/src/main/kotlin/com/sourcegraph/cody/agent/protocol_generated/ModelTag.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@file:Suppress("FunctionName", "ClassName", "unused", "EnumEntryName", "UnusedImport") | ||
package com.sourcegraph.cody.agent.protocol_generated; | ||
|
||
typealias ModelTag = String // One of: power, speed, balanced, recommended, deprecated, experimental, pro, free, enterprise, gateway, byok, local, ollama, dev | ||
typealias ModelTag = String // One of: power, speed, balanced, recommended, deprecated, experimental, waitlist, on-waitlist, early-access, pro, free, enterprise, gateway, byok, local, ollama, dev, stream-disabled | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.