| const buildOptions = (endpoint, parsedBody) => { | |
| const { | |
| chatGptLabel, | |
| promptPrefix, | |
| maxContextTokens, | |
| resendFiles, | |
| imageDetail, | |
| iconURL, | |
| greeting, | |
| spec, | |
| ...rest | |
| } = parsedBody; | |
| const endpointOption = { | |
| endpoint, | |
| chatGptLabel, | |
| promptPrefix, | |
| resendFiles, | |
| imageDetail, | |
| iconURL, | |
| greeting, | |
| spec, | |
| maxContextTokens, | |
| modelOptions: { | |
| ...rest, | |
| }, | |
| }; | |
| return endpointOption; | |
| }; | |
| module.exports = buildOptions; | |