mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02: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;
|