feat(frontend): add support for agent selection in GPT plugins in adding functions agent

Add support for selecting an agent in the GPT plugins endpoint. The agent can be selected from a dropdown menu in the AgentSettings component. The default agent is set to 'classic' in the cleanupPreset, getDefaultConversation, and handleSubmit functions.
This commit is contained in:
Daniel Avila 2023-06-13 23:40:25 -04:00 committed by Danny Avila
parent 3caddd6854
commit 198f60c536
7 changed files with 131 additions and 16 deletions

View file

@ -51,6 +51,7 @@ const cleanupPreset = ({ preset: _preset, endpointsConfig = {} }) => {
};
} else if (endpoint === 'gptPlugins') {
const agentOptions = _preset?.agentOptions ?? {
agent: 'classic',
model: 'gpt-3.5-turbo',
temperature: 0,
// top_p: 1,

View file

@ -67,6 +67,7 @@ const buildDefaultConversation = ({
};
} else if (endpoint === 'gptPlugins') {
const agentOptions = lastConversationSetup?.agentOptions ?? {
agent: 'classic',
model: 'gpt-3.5-turbo',
temperature: 0,
// top_p: 1,

View file

@ -88,6 +88,7 @@ const useMessageHandler = () => {
responseSender = 'ChatGPT';
} else if (endpoint === 'gptPlugins') {
const agentOptions = currentConversation?.agentOptions ?? {
agent: 'classic',
model: 'gpt-3.5-turbo',
temperature: 0,
// top_p: 1,