N.Achyuth Reddy
Upload 683 files
9705b6c
raw
history blame contribute delete
562 Bytes
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;