* feat: add Maritalk icon * feat: add Maritalk model component * fix: update icon size * feat: optimize MaritalkModelComponent initialization This commit optimizes the initialization of the MaritalkModelComponent class in the Maritalk.py file. It updates the default value for the 'temperature' parameter to be within the range of 0 to 1, using the RangeSpec class. This ensures that the temperature value is valid and improves the overall functionality of the component. * style: format maritalk svg * feat: optimize MaritalkModelComponent initialization This commit optimizes the initialization of the MaritalkModelComponent class in the Maritalk.py file. It updates the default value for the 'temperature' parameter to be within the range of 0 to 1, using the RangeSpec class. This ensures that the temperature value is valid and improves the overall functionality of the component. * feat: update 'stream' parameter to be advanced in MaritalkModelComponent This commit updates the 'stream' parameter in the MaritalkModelComponent class to be an advanced option. By setting the 'advanced' attribute to True, the 'stream' parameter will only be visible to advanced users. This change improves the usability of the component by hiding this option from regular users who do not need it.
575 lines
13 KiB
TypeScript
575 lines
13 KiB
TypeScript
import {
|
|
AlertCircle,
|
|
AlertTriangle,
|
|
ArrowBigUp,
|
|
ArrowLeft,
|
|
ArrowUpToLine,
|
|
Bell,
|
|
Binary,
|
|
Blocks,
|
|
BookMarked,
|
|
BookmarkPlus,
|
|
Bot,
|
|
Boxes,
|
|
Braces,
|
|
BrainCircuit,
|
|
Check,
|
|
CheckCircle2,
|
|
ChevronDown,
|
|
ChevronLeft,
|
|
ChevronRight,
|
|
ChevronRightSquare,
|
|
ChevronUp,
|
|
ChevronsLeft,
|
|
ChevronsRight,
|
|
ChevronsUpDown,
|
|
ChevronsUpDownIcon,
|
|
Circle,
|
|
CircleDot,
|
|
CircleOff,
|
|
Clipboard,
|
|
Code,
|
|
Code2,
|
|
Combine,
|
|
Command,
|
|
Compass,
|
|
Copy,
|
|
Cpu,
|
|
CpuIcon,
|
|
Database,
|
|
Delete,
|
|
Dot,
|
|
Download,
|
|
DownloadCloud,
|
|
Edit,
|
|
Ellipsis,
|
|
Eraser,
|
|
ExternalLink,
|
|
Eye,
|
|
EyeOff,
|
|
File,
|
|
FileClock,
|
|
FileDown,
|
|
FileSearch,
|
|
FileSearch2,
|
|
FileSliders,
|
|
FileText,
|
|
FileType2,
|
|
FileUp,
|
|
FlaskConical,
|
|
FolderIcon,
|
|
FolderPlus,
|
|
FolderPlusIcon,
|
|
FolderUp,
|
|
FormInput,
|
|
Forward,
|
|
Gift,
|
|
GitBranchPlus,
|
|
GitFork,
|
|
GithubIcon,
|
|
Globe,
|
|
Group,
|
|
Hammer,
|
|
Heart,
|
|
HelpCircle,
|
|
Home,
|
|
Info,
|
|
Key,
|
|
Keyboard,
|
|
Laptop2,
|
|
Layers,
|
|
Link,
|
|
Loader2,
|
|
Lock,
|
|
LogIn,
|
|
LogOut,
|
|
LucideSend,
|
|
Maximize2,
|
|
Menu,
|
|
MessageCircle,
|
|
MessageSquare,
|
|
MessageSquareMore,
|
|
MessagesSquare,
|
|
Minimize2,
|
|
Minus,
|
|
MoonIcon,
|
|
MoreHorizontal,
|
|
Network,
|
|
Package2,
|
|
Palette,
|
|
Paperclip,
|
|
PaperclipIcon,
|
|
Pencil,
|
|
PencilLine,
|
|
Pin,
|
|
Play,
|
|
Plus,
|
|
PlusCircle,
|
|
PlusSquare,
|
|
PocketKnife,
|
|
Redo,
|
|
RefreshCcw,
|
|
RefreshCcwDot,
|
|
Repeat,
|
|
RotateCcw,
|
|
Save,
|
|
SaveAll,
|
|
ScanEye,
|
|
Scissors,
|
|
ScreenShare,
|
|
ScrollText,
|
|
Search,
|
|
Settings,
|
|
Settings2,
|
|
Share,
|
|
Share2,
|
|
Shield,
|
|
Sliders,
|
|
SlidersHorizontal,
|
|
Snowflake,
|
|
Sparkles,
|
|
Square,
|
|
SquarePen,
|
|
Store,
|
|
SunIcon,
|
|
TerminalIcon,
|
|
TerminalSquare,
|
|
TextCursorInput,
|
|
TextSearch,
|
|
ToyBrick,
|
|
Trash2,
|
|
Type,
|
|
Undo,
|
|
Ungroup,
|
|
Unplug,
|
|
Upload,
|
|
User,
|
|
UserCog2,
|
|
UserMinus2,
|
|
UserPlus2,
|
|
Users2,
|
|
Variable,
|
|
Wand2,
|
|
Workflow,
|
|
Wrench,
|
|
X,
|
|
XCircle,
|
|
Zap,
|
|
} from "lucide-react";
|
|
import { FaApple, FaDiscord, FaGithub } from "react-icons/fa";
|
|
import { AWSIcon } from "../icons/AWS";
|
|
import { AirbyteIcon } from "../icons/Airbyte";
|
|
import { AnthropicIcon } from "../icons/Anthropic";
|
|
import { AstraDBIcon } from "../icons/AstraDB";
|
|
import { AzureIcon } from "../icons/Azure";
|
|
import { BingIcon } from "../icons/Bing";
|
|
import { BotMessageSquareIcon } from "../icons/BotMessageSquare";
|
|
import { CassandraIcon } from "../icons/Cassandra";
|
|
import { ChromaIcon } from "../icons/ChromaIcon";
|
|
import { CohereIcon } from "../icons/Cohere";
|
|
import { CouchbaseIcon } from "../icons/Couchbase";
|
|
import { ElasticsearchIcon } from "../icons/ElasticsearchStore";
|
|
import { EvernoteIcon } from "../icons/Evernote";
|
|
import { FBIcon } from "../icons/FacebookMessenger";
|
|
import { FirecrawlIcon } from "../icons/Firecrawl";
|
|
import { GitBookIcon } from "../icons/GitBook";
|
|
import { GoogleIcon } from "../icons/Google";
|
|
import { GoogleGenerativeAIIcon } from "../icons/GoogleGenerativeAI";
|
|
import {
|
|
GradientInfinity,
|
|
GradientSave,
|
|
GradientUngroup,
|
|
} from "../icons/GradientSparkles";
|
|
import { GroqIcon } from "../icons/Groq";
|
|
import { HuggingFaceIcon } from "../icons/HuggingFace";
|
|
import { IFixIcon } from "../icons/IFixIt";
|
|
import { LangChainIcon } from "../icons/LangChain";
|
|
import { MaritalkIcon } from "../icons/Maritalk";
|
|
import { MetaIcon } from "../icons/Meta";
|
|
import { MidjourneyIcon } from "../icons/Midjorney";
|
|
import { MongoDBIcon } from "../icons/MongoDB";
|
|
import { NotionIcon } from "../icons/Notion";
|
|
import { NvidiaIcon } from "../icons/Nvidia";
|
|
import { OllamaIcon } from "../icons/Ollama";
|
|
import { OpenAiIcon } from "../icons/OpenAi";
|
|
import { PineconeIcon } from "../icons/Pinecone";
|
|
import { PostgresIcon } from "../icons/Postgres";
|
|
import { PythonIcon } from "../icons/Python";
|
|
import { QDrantIcon } from "../icons/QDrant";
|
|
import { QianFanChatIcon } from "../icons/QianFanChat";
|
|
import { RedisIcon } from "../icons/Redis";
|
|
import { SearxIcon } from "../icons/Searx";
|
|
import { ShareIcon } from "../icons/Share";
|
|
import { Share2Icon } from "../icons/Share2";
|
|
import SvgSlackIcon from "../icons/Slack/SlackIcon";
|
|
import { Streamlit } from "../icons/Streamlit";
|
|
import { UpstashSvgIcon } from "../icons/Upstash";
|
|
import { VectaraIcon } from "../icons/VectaraIcon";
|
|
import { VertexAIIcon } from "../icons/VertexAI";
|
|
import { WeaviateIcon } from "../icons/Weaviate";
|
|
import SvgWikipedia from "../icons/Wikipedia/Wikipedia";
|
|
import SvgWolfram from "../icons/Wolfram/Wolfram";
|
|
import { HackerNewsIcon } from "../icons/hackerNews";
|
|
import { MistralIcon } from "../icons/mistral";
|
|
import { SupabaseIcon } from "../icons/supabase";
|
|
import { iconsType } from "../types/components";
|
|
|
|
export const gradients = [
|
|
"bg-gradient-to-br from-gray-800 via-rose-700 to-violet-900",
|
|
"bg-gradient-to-br from-green-200 via-green-300 to-blue-500",
|
|
"bg-gradient-to-br from-yellow-200 via-yellow-400 to-yellow-700",
|
|
"bg-gradient-to-br from-green-200 via-green-400 to-purple-700",
|
|
"bg-gradient-to-br from-blue-100 via-blue-300 to-blue-500",
|
|
"bg-gradient-to-br from-purple-400 to-yellow-400",
|
|
"bg-gradient-to-br from-red-800 via-yellow-600 to-yellow-500",
|
|
"bg-gradient-to-br from-blue-300 via-green-200 to-yellow-300",
|
|
"bg-gradient-to-br from-blue-700 via-blue-800 to-gray-900",
|
|
"bg-gradient-to-br from-green-300 to-purple-400",
|
|
"bg-gradient-to-br from-yellow-200 via-pink-200 to-pink-400",
|
|
"bg-gradient-to-br from-green-500 to-green-700",
|
|
"bg-gradient-to-br from-rose-400 via-fuchsia-500 to-indigo-500",
|
|
"bg-gradient-to-br from-sky-400 to-blue-500",
|
|
"bg-gradient-to-br from-green-200 via-green-400 to-green-500",
|
|
"bg-gradient-to-br from-red-400 via-gray-300 to-blue-500",
|
|
"bg-gradient-to-br from-gray-900 to-gray-600 bg-gradient-to-r",
|
|
"bg-gradient-to-br from-rose-500 via-red-400 to-red-500",
|
|
"bg-gradient-to-br from-fuchsia-600 to-pink-600",
|
|
"bg-gradient-to-br from-emerald-500 to-lime-600",
|
|
"bg-gradient-to-br from-rose-500 to-indigo-700",
|
|
"bg-gradient-to-br bg-gradient-to-tr from-violet-500 to-orange-300",
|
|
"bg-gradient-to-br from-gray-900 via-purple-900 to-violet-600",
|
|
"bg-gradient-to-br from-yellow-200 via-red-500 to-fuchsia-500",
|
|
"bg-gradient-to-br from-sky-400 to-indigo-900",
|
|
"bg-gradient-to-br from-amber-200 via-violet-600 to-sky-900",
|
|
"bg-gradient-to-br from-amber-700 via-orange-300 to-rose-800",
|
|
"bg-gradient-to-br from-gray-300 via-fuchsia-600 to-orange-600",
|
|
"bg-gradient-to-br from-fuchsia-500 via-red-600 to-orange-400",
|
|
"bg-gradient-to-br from-sky-400 via-rose-400 to-lime-400",
|
|
"bg-gradient-to-br from-lime-600 via-yellow-300 to-red-600",
|
|
];
|
|
|
|
export const nodeColors: { [char: string]: string } = {
|
|
inputs: "#10B981",
|
|
outputs: "#AA2411",
|
|
data: "#198BF6",
|
|
prompts: "#4367BF",
|
|
models: "#ab11ab",
|
|
model_specs: "#6344BE",
|
|
chains: "#FE7500",
|
|
list: "#9AAE42",
|
|
agents: "#903BBE",
|
|
tools: "#FF3434",
|
|
memories: "#F5B85A",
|
|
saved_components: "#a5B85A",
|
|
advanced: "#000000",
|
|
chat: "#198BF6",
|
|
thought: "#272541",
|
|
embeddings: "#42BAA7",
|
|
documentloaders: "#7AAE42",
|
|
vectorstores: "#AA8742",
|
|
vectorsearch: "#AA8742",
|
|
textsplitters: "#B47CB5",
|
|
toolkits: "#DB2C2C",
|
|
wrappers: "#E6277A",
|
|
helpers: "#31A3CC",
|
|
prototypes: "#E6277A",
|
|
langchain_utilities: "#31A3CC",
|
|
output_parsers: "#E6A627",
|
|
// custom_components: "#ab11ab",
|
|
retrievers: "#e6b25a",
|
|
//
|
|
str: "#4F46E5",
|
|
Text: "#4F46E5",
|
|
unknown: "#9CA3AF",
|
|
Document: "#65a30d",
|
|
Data: "#dc2626",
|
|
Message: "#4f46e5",
|
|
Prompt: "#7c3aed",
|
|
Embeddings: "#10b981",
|
|
BaseLanguageModel: "#c026d3",
|
|
LanguageModel: "#c026d3",
|
|
};
|
|
|
|
export const nodeNames: { [char: string]: string } = {
|
|
inputs: "Inputs",
|
|
outputs: "Outputs",
|
|
data: "Data",
|
|
prompts: "Prompts",
|
|
models: "Models",
|
|
model_specs: "Model Specs",
|
|
chains: "Chains",
|
|
agents: "Agents",
|
|
tools: "Tools",
|
|
memories: "Memories",
|
|
saved_components: "Saved",
|
|
advanced: "Advanced",
|
|
chat: "Chat",
|
|
embeddings: "Embeddings",
|
|
documentloaders: "Loaders",
|
|
vectorstores: "Vector Stores",
|
|
vectorsearch: "Vector Search",
|
|
toolkits: "Toolkits",
|
|
wrappers: "Wrappers",
|
|
textsplitters: "Text Splitters",
|
|
retrievers: "Retrievers",
|
|
helpers: "Helpers",
|
|
prototypes: "Prototypes",
|
|
langchain_utilities: "Utilities",
|
|
output_parsers: "Output Parsers",
|
|
custom_components: "Custom",
|
|
unknown: "Other",
|
|
};
|
|
|
|
export const nodeIconsLucide: iconsType = {
|
|
X: X,
|
|
Notify: Bell,
|
|
ListFlows: Group,
|
|
ClearMessageHistory: FileClock,
|
|
Python: PythonIcon,
|
|
ChatOutput: MessagesSquare,
|
|
BotMessageSquareIcon,
|
|
ChatInput: MessagesSquare,
|
|
inputs: Download,
|
|
outputs: Upload,
|
|
data: Database,
|
|
AzureChatOpenAi: AzureIcon,
|
|
Ollama: OllamaIcon,
|
|
ChatOllama: OllamaIcon,
|
|
AzureOpenAiEmbeddings: AzureIcon,
|
|
Azure: AzureIcon,
|
|
OllamaEmbeddings: OllamaIcon,
|
|
ChatOllamaModel: OllamaIcon,
|
|
FAISS: MetaIcon,
|
|
Maritalk: MaritalkIcon,
|
|
FaissSearch: MetaIcon,
|
|
LangChain: LangChainIcon,
|
|
AzureOpenAiModel: AzureIcon,
|
|
Redis: RedisIcon,
|
|
RedisSearch: RedisIcon,
|
|
PostgresChatMessageHistory: PostgresIcon,
|
|
BaiduQianfan: QianFanChatIcon,
|
|
Play,
|
|
Vectara: VectaraIcon,
|
|
ArrowUpToLine: ArrowUpToLine,
|
|
Cassandra: CassandraIcon,
|
|
Chroma: ChromaIcon,
|
|
Couchbase: CouchbaseIcon,
|
|
AirbyteJSONLoader: AirbyteIcon,
|
|
AmazonBedrockEmbeddings: AWSIcon,
|
|
Amazon: AWSIcon,
|
|
Anthropic: AnthropicIcon,
|
|
ChatAnthropic: AnthropicIcon,
|
|
AstraDB: AstraDBIcon,
|
|
BingSearchAPIWrapper: BingIcon,
|
|
BingSearchRun: BingIcon,
|
|
Cohere: CohereIcon,
|
|
ChevronsUpDownIcon,
|
|
CohereEmbeddings: CohereIcon,
|
|
EverNoteLoader: EvernoteIcon,
|
|
FacebookChatLoader: FBIcon,
|
|
FirecrawlCrawlApi: FirecrawlIcon,
|
|
FirecrawlScrapeApi: FirecrawlIcon,
|
|
GitbookLoader: GitBookIcon,
|
|
GoogleSearchAPIWrapper: GoogleIcon,
|
|
GoogleSearchResults: GoogleIcon,
|
|
GoogleSearchRun: GoogleIcon,
|
|
Google: GoogleIcon,
|
|
GoogleGenerativeAI: GoogleGenerativeAIIcon,
|
|
Groq: GroqIcon,
|
|
HNLoader: HackerNewsIcon,
|
|
HuggingFaceHub: HuggingFaceIcon,
|
|
HuggingFace: HuggingFaceIcon,
|
|
HuggingFaceEmbeddings: HuggingFaceIcon,
|
|
IFixitLoader: IFixIcon,
|
|
Meta: MetaIcon,
|
|
Midjorney: MidjourneyIcon,
|
|
MongoDBAtlasVectorSearch: MongoDBIcon,
|
|
MongoDB: MongoDBIcon,
|
|
MongoDBChatMessageHistory: MongoDBIcon,
|
|
NotionDirectoryLoader: NotionIcon,
|
|
NVIDIA: NvidiaIcon,
|
|
ChatOpenAI: OpenAiIcon,
|
|
AzureChatOpenAI: OpenAiIcon,
|
|
OpenAI: OpenAiIcon,
|
|
OpenAIEmbeddings: OpenAiIcon,
|
|
Pinecone: PineconeIcon,
|
|
Qdrant: QDrantIcon,
|
|
ElasticsearchStore: ElasticsearchIcon,
|
|
Weaviate: WeaviateIcon,
|
|
Searx: SearxIcon,
|
|
SlackDirectoryLoader: SvgSlackIcon,
|
|
SupabaseVectorStore: SupabaseIcon,
|
|
Supabase: SupabaseIcon,
|
|
VertexAI: VertexAIIcon,
|
|
ChatVertexAI: VertexAIIcon,
|
|
VertexAIEmbeddings: VertexAIIcon,
|
|
Share3: ShareIcon,
|
|
Share4: Share2Icon,
|
|
agents: Bot,
|
|
Workflow,
|
|
User,
|
|
WikipediaAPIWrapper: SvgWikipedia,
|
|
chains: Link,
|
|
memories: Cpu,
|
|
models: BrainCircuit,
|
|
model_specs: FileSliders,
|
|
prompts: TerminalSquare,
|
|
tools: Hammer,
|
|
advanced: Laptop2,
|
|
chat: MessageCircle,
|
|
Keyboard: Keyboard,
|
|
embeddings: Binary,
|
|
saved_components: GradientSave,
|
|
ScrollText,
|
|
documentloaders: Paperclip,
|
|
vectorstores: Layers,
|
|
vectorsearch: TextSearch,
|
|
toolkits: Package2,
|
|
textsplitters: Scissors,
|
|
wrappers: Gift,
|
|
helpers: Wand2,
|
|
ScanEye,
|
|
prototypes: FlaskConical,
|
|
langchain_utilities: PocketKnife,
|
|
WolframAlphaAPIWrapper: SvgWolfram,
|
|
output_parsers: Compass,
|
|
retrievers: FileSearch,
|
|
unknown: HelpCircle,
|
|
WikipediaQueryRun: SvgWikipedia,
|
|
WolframAlphaQueryRun: SvgWolfram,
|
|
custom_components: GradientInfinity,
|
|
group_components: GradientUngroup,
|
|
custom: Edit,
|
|
Trash2,
|
|
CircleOff,
|
|
Boxes,
|
|
Network,
|
|
XCircle,
|
|
Info,
|
|
CheckCircle2,
|
|
SquarePen,
|
|
Zap,
|
|
MessagesSquare,
|
|
ExternalLink,
|
|
ChevronsUpDown,
|
|
Check,
|
|
Home,
|
|
Users2,
|
|
SunIcon,
|
|
MoonIcon,
|
|
Bell,
|
|
AlertTriangle,
|
|
ChevronLeft,
|
|
SlidersHorizontal,
|
|
Palette,
|
|
RefreshCcwDot,
|
|
FolderUp,
|
|
Blocks,
|
|
ChevronDown,
|
|
ArrowLeft,
|
|
Shield,
|
|
Plus,
|
|
Redo,
|
|
Settings2,
|
|
FileType2,
|
|
Undo,
|
|
FileSearch2,
|
|
ChevronRight,
|
|
Circle,
|
|
CircleDot,
|
|
Clipboard,
|
|
PlusCircle,
|
|
PlusSquare,
|
|
Code2,
|
|
Globe,
|
|
Variable,
|
|
Snowflake,
|
|
Store,
|
|
Download,
|
|
Eraser,
|
|
Lock,
|
|
LucideSend,
|
|
Sparkles,
|
|
DownloadCloud,
|
|
File,
|
|
FileText,
|
|
FolderPlus,
|
|
GitFork,
|
|
GithubIcon,
|
|
FileDown,
|
|
FileUp,
|
|
Menu,
|
|
Save,
|
|
Search,
|
|
Copy,
|
|
Upload,
|
|
MessageSquare,
|
|
MoreHorizontal,
|
|
UserMinus2,
|
|
UserPlus2,
|
|
Pencil,
|
|
ChevronsRight,
|
|
ChevronsLeft,
|
|
FaGithub,
|
|
FaApple,
|
|
EyeOff,
|
|
Eye,
|
|
UserCog2,
|
|
Key,
|
|
Unplug,
|
|
Group,
|
|
LogIn,
|
|
ChevronUp,
|
|
PencilLine,
|
|
Ungroup,
|
|
BookMarked,
|
|
Minus,
|
|
LogOut,
|
|
Square,
|
|
Minimize2,
|
|
Maximize2,
|
|
FormInput,
|
|
ChevronRightSquare,
|
|
SaveAll,
|
|
MessageSquareMore,
|
|
Forward,
|
|
Share2,
|
|
Share,
|
|
GitBranchPlus,
|
|
Loader2,
|
|
BookmarkPlus,
|
|
Heart,
|
|
Pin,
|
|
Link,
|
|
ToyBrick,
|
|
RefreshCcw,
|
|
Combine,
|
|
TerminalIcon,
|
|
TerminalSquare,
|
|
TextCursorInput,
|
|
Repeat,
|
|
Sliders,
|
|
ScreenShare,
|
|
Code,
|
|
Type,
|
|
Ellipsis,
|
|
Braces,
|
|
FlaskConical,
|
|
AlertCircle,
|
|
Bot,
|
|
Delete,
|
|
Command,
|
|
ArrowBigUp,
|
|
Dot,
|
|
RotateCcw,
|
|
Wrench,
|
|
FolderPlusIcon,
|
|
FolderIcon,
|
|
Discord: FaDiscord,
|
|
PaperclipIcon,
|
|
Settings,
|
|
Streamlit,
|
|
MistralAI: MistralIcon,
|
|
Upstash: UpstashSvgIcon,
|
|
PGVector: CpuIcon,
|
|
};
|