-
Notifications
You must be signed in to change notification settings - Fork 12
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
828 streamline chat model configuration info message network call #875
828 streamline chat model configuration info message network call #875
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much the same as for defence config updates, nice work but I think I see a problem.
@@ -39,6 +31,10 @@ const modelConfigIds = [ | |||
|
|||
type MODEL_CONFIG_ID = (typeof modelConfigIds)[number]; | |||
|
|||
type ChatModelConfigurations = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be a reason you pluralised this, right? Is there a clash with another type, or did you feel it made more sense as a plural? Or did you do so to match the frontend code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer it that way.
If each of top p, `frequency penalty etc are one configuration, then the set of all of them should be called configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, but then export it as that - currently you're exporting it as ChatModelConfiguration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👌
A couple of random thoughts but nothing that should prevent merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One teeny thing, else good to go 👍
@@ -39,6 +31,10 @@ const modelConfigIds = [ | |||
|
|||
type MODEL_CONFIG_ID = (typeof modelConfigIds)[number]; | |||
|
|||
type ChatModelConfigurations = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, but then export it as that - currently you're exporting it as ChatModelConfiguration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get it in! ⚡
Description
Before, when the user would configure the chatModel, we would send a request to the backend. If the backend successfully configured the model, then the frontend would send a further request to add the info message to the chat history, eg 'changed frequencyPenalty to 0.6'.
This PR changes it so that when the backend successfully configures the chatModel, the backend generates the info message and appends it to the history, then forwards it on to the frontend.
Notes
handleConfigureModel
now generates an info message, appends it to the chat history and forwards it to the frontend.MODEL_CONFIG
enum toMODEL_CONFIG_ID
and converts it to a string literal type, on frontend and backend.handleConfigureModel
.handleConfigureModel
.Checklist
Have you done the following?