🤖 refactor: Remove Default Model Params for All Endpoints (#3682)

* refactor: use parseCompactConvo in buildOptions, and generate no default values for the API to avoid weird model behavior with defaults

* refactor: OTHER - always show cursor when markdown component is empty (preferable to not)

* refactor(OpenAISettings): use config object for setting defaults app-wide

* refactor: Use removeNullishValues in buildOptions for ALL  endpoints

* fix: add missing conversationId to title methods for transactions; refactor(GoogleClient): model options, set no default, add todo note for recording token usage

* fix: at minimum set a model default, as is required by API (edge case)
This commit is contained in:
Danny Avila 2024-08-18 06:00:03 -04:00 committed by GitHub
parent d3a20357e9
commit 683702d555
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 169 additions and 141 deletions

View file

@ -1,16 +1,18 @@
const { removeNullishValues } = require('librechat-data-provider');
const buildOptions = (endpoint, parsedBody, endpointType) => {
const {
chatGptLabel,
promptPrefix,
maxContextTokens,
resendFiles,
resendFiles = true,
imageDetail,
iconURL,
greeting,
spec,
...rest
...modelOptions
} = parsedBody;
const endpointOption = {
const endpointOption = removeNullishValues({
endpoint,
endpointType,
chatGptLabel,
@ -21,10 +23,8 @@ const buildOptions = (endpoint, parsedBody, endpointType) => {
greeting,
spec,
maxContextTokens,
modelOptions: {
...rest,
},
};
modelOptions,
});
return endpointOption;
};