mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
32 lines
562 B
JavaScript
32 lines
562 B
JavaScript
|
|
const buildOptions = (endpoint, parsedBody) => {
|
||
|
|
const {
|
||
|
|
chatGptLabel,
|
||
|
|
promptPrefix,
|
||
|
|
agentOptions,
|
||
|
|
tools,
|
||
|
|
model,
|
||
|
|
temperature,
|
||
|
|
top_p,
|
||
|
|
presence_penalty,
|
||
|
|
frequency_penalty,
|
||
|
|
} = parsedBody;
|
||
|
|
const endpointOption = {
|
||
|
|
endpoint,
|
||
|
|
tools: tools.map((tool) => tool.pluginKey) ?? [],
|
||
|
|
chatGptLabel,
|
||
|
|
promptPrefix,
|
||
|
|
agentOptions,
|
||
|
|
modelOptions: {
|
||
|
|
model,
|
||
|
|
temperature,
|
||
|
|
top_p,
|
||
|
|
presence_penalty,
|
||
|
|
frequency_penalty,
|
||
|
|
},
|
||
|
|
};
|
||
|
|
|
||
|
|
return endpointOption;
|
||
|
|
};
|
||
|
|
|
||
|
|
module.exports = buildOptions;
|