-
-
Notifications
You must be signed in to change notification settings - Fork 388
feat: Support editing all parameters individually for each model #1562
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
base: master
Are you sure you want to change the base?
Conversation
bugbot run |
With these individual parameter settings, should the global one still exist? |
Now, temperature and maxTokens is global parameters. For non-technical personnel, default values for these parameters are needed, and it should be convenient to quickly adjust all models. Once they understand the meaning of these parameters, they can independently configure the parameters for each model. This is a step-by-step process. |
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.
According to our previous chat, we should either remove the global settings or do something else, the idea is to have only 1 source of truth.
I have removed the global settings for temperature and maxTokens |
bugbot run |
I just realized that embedding models are not editable like the chat models. We should make them editable too same as chat models. |
Also don't forget to rebase on the new master. |
bugbot run |
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.
Bug: API Parameter Removal Breaks User Configurations
The safeFetch
function unconditionally deletes the frequency_penalty
parameter from all API request bodies. This causes user-configured frequencyPenalty
settings (added in chatModelManager.ts
) to be ignored by all providers using safeFetch
with CORS enabled, rendering the feature non-functional. Although the code comment indicates this was a temporary workaround for perplexity.ai
, its global application breaks the feature for all other providers.
src/utils.ts#L491-L495
Lines 491 to 495 in f49fe3c
const newBody = JSON.parse(options.body ?? {}); | |
// todo(emt-lin):frequency_penalty: default 0, but perplexity.ai requires 1 by default. so, delete this argument for now | |
delete newBody["frequency_penalty"]; | |
options.body = JSON.stringify(newBody); | |
} |
Bug: Temperature Slider Default Mismatch
The temperature slider in the model edit modal uses a fallback default value of 1. This is inconsistent with the PR discussion, which indicated a default of 0.9, and the previous global default of 0.1. A temperature of 1 is unusually high for most AI models, leading to overly creative and unpredictable outputs.
src/settings/v2/components/ModelEditDialog.tsx#L298-L299
obsidian-copilot/src/settings/v2/components/ModelEditDialog.tsx
Lines 298 to 299 in f49fe3c
<SettingSlider | |
value={localModel.temperature ?? settings.temperature ?? 1} |
Was this report helpful? Give feedback by reacting with 👍 or 👎
</TooltipContent> | ||
</Tooltip> | ||
</TooltipProvider> | ||
</div> | ||
} | ||
> | ||
<SettingSlider | ||
value={localModel.temperature ?? 0.1} | ||
value={localModel.temperature ?? settings.temperature ?? 1} |
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.
Why 1? It's another magic number, if there's a reason we should name it something obvious.
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.
it's the result of autocompelete by ai. I forget to keep it consistent with the setting default value.(and also maxTokens )
@logancyang Can you test the perplexity.ai API? It has supported the frequency_penalty value of 0. docs: https://docs.perplexity.ai/api-reference/chat-completions-post#body-frequency-penalty |
Overview
Now, you can edit all all parameters individually for each model and new models by duplicating existing ones.
actual effect:
issues
Key changes