diff --git a/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatEnableMetaResponse/index.jsx b/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatEnableMetaResponse/index.jsx
index d6434405..6d0da1e6 100644
--- a/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatEnableMetaResponse/index.jsx
+++ b/frontend/src/pages/WorkspaceSettings/ChatSettings/ChatEnableMetaResponse/index.jsx
@@ -15,9 +15,9 @@ export default function ChatEnableMetaResponse({ workspace, setHasChanges }) {
}
onToggle={toggleMetaResponse}
name="metaResponse"
- description="Turn on this feature to dynamically adjust the chat interface based on conversation context, using options like dropdowns, sliders, and suggestions for a tailored user experience."
- // badge
- // badgeLabel="New"
+ description="Turn on this feature to dynamically adjust the chat interface based on conversation context, using options like dropdowns, sliders, and suggestions for a tailored user experience. For Better experience, use GPT-4 or any advanced LLM model."
+ badge
+ badgeLabel="New"
// badgeAnimated
/>
diff --git a/frontend/src/pages/WorkspaceSettings/MetaResponse/FeatureSettings/EnableSystemPrompt/index.jsx b/frontend/src/pages/WorkspaceSettings/MetaResponse/FeatureSettings/EnableSystemPrompt/index.jsx
index 652ce9ec..be762ed3 100644
--- a/frontend/src/pages/WorkspaceSettings/MetaResponse/FeatureSettings/EnableSystemPrompt/index.jsx
+++ b/frontend/src/pages/WorkspaceSettings/MetaResponse/FeatureSettings/EnableSystemPrompt/index.jsx
@@ -9,7 +9,9 @@ export default function EnableSystemPrompt({
}) {
const [isEnabled, setIsEnabled] = useState(
settings.config.systemPrompt.isEnabled ||
- settings.config.systemPrompt.content !== ""
+ settings.config.systemPrompt.list[
+ settings.config.systemPrompt.active
+ ].content
);
const toggleSystemPrompt = () => {
@@ -47,6 +49,9 @@ export default function EnableSystemPrompt({
description="Specify the context and instructions for the AI in this workspace. A well-defined prompt ensures the AI delivers relevant and precise responses."
inline
content={content}
+ disabled={settings.config.systemPrompt.list[
+ settings.config.systemPrompt.active
+ ].content}
/>
);
diff --git a/frontend/src/pages/WorkspaceSettings/MetaResponse/FeatureSettings/index.jsx b/frontend/src/pages/WorkspaceSettings/MetaResponse/FeatureSettings/index.jsx
index 0e6502b8..5dd247d1 100644
--- a/frontend/src/pages/WorkspaceSettings/MetaResponse/FeatureSettings/index.jsx
+++ b/frontend/src/pages/WorkspaceSettings/MetaResponse/FeatureSettings/index.jsx
@@ -20,10 +20,12 @@ export default function FeatureSettings({
settings={settings}
onUpdateSettings={onUpdateSettings}
/>
- {settings.config.systemPrompt.content !== "" ||
+ {settings.config.systemPrompt.list[
+ settings.config.systemPrompt.active
+ ].content ||
settings.config.systemPrompt.isEnabled ? (
) : null}
diff --git a/frontend/src/pages/WorkspaceSettings/MetaResponse/index.jsx b/frontend/src/pages/WorkspaceSettings/MetaResponse/index.jsx
index 00bf2d42..7a537b83 100644
--- a/frontend/src/pages/WorkspaceSettings/MetaResponse/index.jsx
+++ b/frontend/src/pages/WorkspaceSettings/MetaResponse/index.jsx
@@ -108,7 +108,9 @@ export default function MetaResponseSettings({ workspace, setWorkspace }) {
Object.keys(settings).map((feature) => {
const featureSettings = settings[feature];
if (featureSettings.isEnabled) {
- openAiPrompt += featureSettings.config.systemPrompt.content;
+ openAiPrompt += featureSettings.config.systemPrompt.list[
+ featureSettings.config.systemPrompt.active
+ ].content;
openAiPrompt +=
featureSettings.config.promptSchema.list[
featureSettings.config.promptSchema.active
diff --git a/server/endpoints/workspaces.js b/server/endpoints/workspaces.js
index ed99caa4..e76bee08 100644
--- a/server/endpoints/workspaces.js
+++ b/server/endpoints/workspaces.js
@@ -101,7 +101,7 @@ function workspaceEndpoints(app) {
WorkspaceMetaResponse.defaultSystemPrompt;
Object.keys(metaResponseDefaultSettings).map((feature) => {
metaResponseDefaultSettings[feature].config.systemPrompt.content = currentSystemPrompt;
- metaResponseDefaultSettings[feature].config.promptSchema.list[0] = {
+ metaResponseDefaultSettings[feature].config.systemPrompt.list[0] = {
title: "Default",
content: currentSystemPrompt,
}
diff --git a/server/models/workspaceMetaResponse.js b/server/models/workspaceMetaResponse.js
index 2bc7e70a..c798fa72 100644
--- a/server/models/workspaceMetaResponse.js
+++ b/server/models/workspaceMetaResponse.js
@@ -80,6 +80,10 @@ const WorkspaceMetaResponse = {
title: "Default",
content: "",
},
+ {
+ title: "Sequence Example",
+ content:"### Interaction Sequence\n1. if list is not provided, ask the user to provide a list, be helpful by providing some suggestions to start with, ask user to chose one, or just click \"use Keyboard input\" to type any other list.\n return: options of 4 best lists in full markdown, associated with json options of dispayType buttons in json object\n3. complement the user about his choice and proceed by presenting the list items, ask user to chose one, or just click \"use Keyboard input\" to type any other item if they has one in mind.\n return: options of 4 items in full markdown, associated with json options of dispayType buttons in json object\n4. Provide information about the item, break down the information to options.\n return: information about the item in full markdown add simplified comparison table with closest item add as well fun fact, associated with break down of the information to list of options, displayType checkbox with sub-label \"I can break down this information further\".\n1. Provide information about what they asked.\n Return: information in full markdown, references, and simplified example if possible, a mermaid chart for illustration. associated with two options ether to dig deeper where you will go back to step 5, or start over where you will go back to step 1, displayType dropdown with sub-label \"would you like top know more...\", \n3. give user a 1. Dig deeper or 2. switch to a new topic, options.\n return: give user 2 options ether to displayType dropdown with sub-label \"would you like top know more...\", ask the user if they want to know about something else then go to Next step 1, or dig deeper about [topic], so go to step 3.\n ",
+ }
],
canEdit: ["admin", "manager"],
},
@@ -91,7 +95,7 @@ const WorkspaceMetaResponse = {
content: "## Prompt Guidelines\n- you are a helpful assistant, you will be provided a question to create a list of four elements\n- when requested to return structured data return them in a JSON object code block , don't introduce them or label them, just return them at the end of your response.\n- When presenting choices or detailed information, encapsulate the data in JSON format, aiming for a user-friendly interaction through:\n\t- type options: you will use this if options are a better way to seak users interaction, include displayTypess: buttons, list,checkbox, or dropdown based on the context.\n\t- type range: you will use this if the user is required to input a numeric between a certain range.\n\t- type rating: you will use this if the user should insert a rating, uswaly between one and five.\n\t- type date: you will use this if the user should insert a date.\n- if asked to return options return them as structured data, only when asked.\n- always return response as normal in markdown first then associate the data structure object below.\n- make your response rich in markdown.\n- if you find that your response at any time contain options follow the instructions above.\n- Important follow strictly the json schema examples provided below\n---\n### Response Example\n#### Discover More\n**Fascinating Topic**\nExplore intriguing facts and details about your chosen subject, enhancing your understanding and curiosity.\n\n```json\n{\n \"inputs\": {\n \"type\": \"options\",\n \"data\": {\n \"options\": [\n {\n \"label\": \"Restart Router\",\n \"value\": \"restart router\"\n },\n {\n \"label\": \"Check Service Status\",\n \"value\": \"check service status\"\n },\n ... \n ],\n \"label\":\"Select Server \",\n \"description\":\"list of servers as described\"\n \n },\n \"settings\": {\n \"allowMultiple\": false,\n \"displayType\": \"chose one, buttons/list/dropdown\"\n }\n },\n \"sentiment\": \"happy\",\n \"style\": \"text\"\n}\n```\n\ninput types:\n```json\n{\n \"inputs\": {\n \"type\":\"options\",\n \"data\":{\n \"options\":[\n {\n \"label\":\"Restart Router\",\n \"value\":\"restart_router\"\n },\n {\n \"label\":\"Check Service Status\",\n \"value\":\"check_service_status\"\n },\n {\n \"label\":\"Contact Support\",\n \"value\":\"contact_support\"\n }\n ]\n },\n \"settings\":{\n \"allowMultiple\":false,\n \"displayType\":\"buttons\"\n }\n }\n}\n```\n\n```json\n{\n \"inputs\": {\n \"type\":\"range\",\n \"data\":{\n \"min\":1,\n \"max\":10,\n \"step\":1\n },\n \"settings\":{\n \"showValue\":true\n }\n }\n}\n```\n\n```json\n{\n\"inputs\": {\n \"type\":\"rating\",\n \"data\":{\n \"max\":5,\n \"defaultValue\":3,\n \"icon\":\"star\"\n }\n }\n}\n```\n\n```json\n{\n\"inputs\": {\n \"type\":\"date\",\n \"settings\":{\n \"format\":\"YYYY-MM-DD\",\n \"minDate\":\"2021-01-01\",\n \"maxDate\":\"2023-12-31\"\n }\n}\n}\n```\n---\n",
},
{
- title: "Suggestions Buttons Type",
+ title: "Suggestions Buttons",
content: "## Prompt Guidelines Suggestions Buttons Type\n- you are a helpful assistant, you will be provided a question to create a list of four elements\n- when requested to return structured data return them in a JSON object code block , don't introduce them or label them, just return them at the end of your response.\n- When presenting choices or detailed information, encapsulate the data in JSON format, aiming for a user-friendly interaction through:\n\t- type options: you will use this if options are a better way to seak users interaction, include displayTypess: buttons, list,checkbox, or dropdown based on the context.\n\t- type range: you will use this if the user is required to input a numeric between a certain range.\n\t- type rating: you will use this if the user should insert a rating, uswaly between one and five.\n\t- type date: you will use this if the user should insert a date.\n- if asked to return options return them as structured data, only when asked.\n- always return response as normal in markdown first then associate the data structure object below.\n- make your response rich in markdown.\n- if you find that your response at any time contain options follow the instructions above.\n- Important follow strictly the json schema examples provided below\n---\n### Response Example\n#### Discover More\n**Fascinating Topic**\nExplore intriguing facts and details about your chosen subject, enhancing your understanding and curiosity.\n\n```json\n{\n \"inputs\": {\n \"type\": \"options\",\n \"data\": {\n \"options\": [\n {\n \"label\": \"Restart Router\",\n \"value\": \"restart router\"\n },\n {\n \"label\": \"Check Service Status\",\n \"value\": \"check service status\"\n },\n ... \n ],\n \"label\":\"Select Server \",\n \"description\":\"list of servers as described\"\n \n },\n \"settings\": {\n \"allowMultiple\": false,\n \"displayType\": \"chose one, buttons/list/dropdown\"\n }\n },\n \"sentiment\": \"happy\",\n \"style\": \"text\"\n}\n```",
},
],
@@ -133,7 +137,8 @@ const WorkspaceMetaResponse = {
description: "Traditionally, interaction with AnythingLLM occurs through a text area. Meta Inputs enhance this by offering alternative interaction methods, including option buttons, multi-select checkboxes, sliders, drop-down menus, and date/time selectors. To utilize these components, you'll need to guide the LLM on incorporating them into its responses with a specific schema",
infoLink: "https://docs.anythingllm.com/docs/meta-response/inputs",
},
- sentiments: {
+ // Example of adding more meta response settings
+ /* sentiments: {
isEnabled: false,
config: {
systemPrompt: {
@@ -266,7 +271,7 @@ const WorkspaceMetaResponse = {
permissions: ["user"],
description: "Enable avatars to reflect user sentiments, allowing the AI to visually empathize and convey understanding through changes in its profile image based on the meta object's sentiment data.",
infoLink: "https://docs.anythingllm.com/docs/meta-response/avatars",
- },
+ },*/
},
};