mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
* 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)
32 lines
609 B
JavaScript
32 lines
609 B
JavaScript
const { removeNullishValues } = require('librechat-data-provider');
|
|
|
|
const buildOptions = (endpoint, parsedBody, endpointType) => {
|
|
const {
|
|
chatGptLabel,
|
|
promptPrefix,
|
|
maxContextTokens,
|
|
resendFiles = true,
|
|
imageDetail,
|
|
iconURL,
|
|
greeting,
|
|
spec,
|
|
...modelOptions
|
|
} = parsedBody;
|
|
const endpointOption = removeNullishValues({
|
|
endpoint,
|
|
endpointType,
|
|
chatGptLabel,
|
|
promptPrefix,
|
|
resendFiles,
|
|
imageDetail,
|
|
iconURL,
|
|
greeting,
|
|
spec,
|
|
maxContextTokens,
|
|
modelOptions,
|
|
});
|
|
|
|
return endpointOption;
|
|
};
|
|
|
|
module.exports = buildOptions;
|