mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
feat(experimental): FunctionsAgent, uses new function payload for tooling
This commit is contained in:
parent
550e566097
commit
3caddd6854
8 changed files with 227 additions and 52 deletions
|
|
@ -39,8 +39,8 @@ router.post('/', requireJwtAuth, async (req, res) => {
|
|||
if (endpoint !== 'gptPlugins') return handleError(res, { text: 'Illegal request' });
|
||||
|
||||
const agentOptions = req.body?.agentOptions ?? {
|
||||
agent: 'classic',
|
||||
model: 'gpt-3.5-turbo',
|
||||
// model: 'gpt-4', // for agent model
|
||||
temperature: 0,
|
||||
// top_p: 1,
|
||||
// presence_penalty: 0,
|
||||
|
|
@ -60,20 +60,12 @@ router.post('/', requireJwtAuth, async (req, res) => {
|
|||
presence_penalty: req.body?.presence_penalty ?? 0,
|
||||
frequency_penalty: req.body?.frequency_penalty ?? 0
|
||||
},
|
||||
agentOptions
|
||||
agentOptions: {
|
||||
...agentOptions,
|
||||
// agent: 'functions'
|
||||
}
|
||||
};
|
||||
|
||||
// const availableModels = getOpenAIModels();
|
||||
// if (availableModels.find((model) => model === endpointOption.modelOptions.model) === undefined) {
|
||||
// return handleError(res, { text: `Illegal request: model` });
|
||||
// }
|
||||
|
||||
// console.log('ask log', {
|
||||
// text,
|
||||
// conversationId,
|
||||
// endpointOption
|
||||
// });
|
||||
|
||||
console.log('ask log');
|
||||
console.dir({ text, conversationId, endpointOption }, { depth: null });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue