mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-09-28 15:10:10 +02:00
added Meta Response Title Block above meta settings to discribe settings intent
This commit is contained in:
parent
ca112130bd
commit
b8573a7894
@ -24,7 +24,7 @@ export default function TitleBlock({
|
|||||||
<div className="relative rounded-lg">
|
<div className="relative rounded-lg">
|
||||||
<div className="space-y-6 flex h-full w-full">
|
<div className="space-y-6 flex h-full w-full">
|
||||||
<div className="w-full flex flex-col gap-y-4">
|
<div className="w-full flex flex-col gap-y-4">
|
||||||
<div className="flex gap-4">
|
<div className={`flex ${Icon ? "gap-4" : ""}`}>
|
||||||
{Icon && <Icon className="w-16 h-16 text-white/30" />}
|
{Icon && <Icon className="w-16 h-16 text-white/30" />}
|
||||||
<div>
|
<div>
|
||||||
<div className="flex flex-row gap-4">
|
<div className="flex flex-row gap-4">
|
||||||
|
@ -35,7 +35,10 @@ export default function WorkspaceChat({ loading, workspace }) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
console.log("meta Response Settings:", metaResponseSettings);
|
console.log("meta Response Settings:", metaResponseSettings);
|
||||||
if (Object.values(metaResponseSettings).some((settings) => settings.isEnabled)
|
if (
|
||||||
|
Object.values(metaResponseSettings).some(
|
||||||
|
(settings) => settings.isEnabled
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
chatHistory = chatHistory.map((message) => {
|
chatHistory = chatHistory.map((message) => {
|
||||||
if (message.role === "assistant") {
|
if (message.role === "assistant") {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import MetaResponse from "@/models/metaResponse";
|
import MetaResponse from "@/models/metaResponse";
|
||||||
import showToast from "@/utils/toast";
|
import showToast from "@/utils/toast";
|
||||||
import { ChatText, Heart, UserCircle } from "@phosphor-icons/react";
|
import { ChatText, Cube, Heart, UserCircle } from "@phosphor-icons/react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import EnableFeatures from "./EnableFeatures";
|
import EnableFeatures from "./EnableFeatures";
|
||||||
import FeatureSettings from "./FeatureSettings";
|
import FeatureSettings from "./FeatureSettings";
|
||||||
|
import TitleBlock from "@/components/Generic/Blocks/TitleBlock";
|
||||||
|
|
||||||
export default function MetaResponseSettings({ workspace }) {
|
export default function MetaResponseSettings({ workspace }) {
|
||||||
const [settings, setSettings] = useState({});
|
const [settings, setSettings] = useState({});
|
||||||
@ -70,7 +71,16 @@ export default function MetaResponseSettings({ workspace }) {
|
|||||||
// };
|
// };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative w-full gap-4 max-h-full grid grid-cols-1 lg:grid-cols-2 2xl:max-w-6xl ">
|
<div className="flex flex-col gap-4 max-w-3xl">
|
||||||
|
<div className="px-4">
|
||||||
|
<TitleBlock
|
||||||
|
label="Meta Response"
|
||||||
|
description="This feature lets you dictate app behaviour through AI-generated responses, using a specific schema to structure data. It aligns with specially designed components that interpret this schema, enabling custom configurations for managing these components efficiently."
|
||||||
|
labelStyles="text-2xl font-bold text-white"
|
||||||
|
Icon={Cube}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="relative w-full gap-4 max-h-full grid grid-cols-1 lg:grid-cols-2 ">
|
||||||
{Object.keys(settings).map((feature) => {
|
{Object.keys(settings).map((feature) => {
|
||||||
const featureSettings = settings[feature];
|
const featureSettings = settings[feature];
|
||||||
const IconComponent = mapIcons[feature];
|
const IconComponent = mapIcons[feature];
|
||||||
@ -112,5 +122,6 @@ export default function MetaResponseSettings({ workspace }) {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user