mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-14 18:40:11 +01:00
1846a99b93
* WIP embedded app * WIP got response from backend in embedded app * WIP streaming prints to embedded app * implemented streaming and tailwind min for styling into embedded app * WIP embedded app history functional * load params from script tag into embedded app * rough in modularization of embed chat cleanup dev process for easier dev support move all chat to components todo: build process todo: backend support * remove eslint config * Implement models and cleanup embed chat endpoints Improve build process for embed prod minification and bundle size awareness WIP * forgot files * rename to embed folder * introduce chat modal styles * add middleware validations on embed chat * auto open param and default greeting * reset chat history * Admin embed config page * Admin Embed Chats mgmt page * update embed * nonpriv * more style support reopen if chat was last opened * update comments * remove unused imports * allow change of workspace for embedconfig * update failure to lookup message * update reset script * update instructions * Add more styling options Add sponsor text at bottom Support dynamic container height Loading animations * publish new embed script * Add back syntax highlighting and keep bundle small via dynamic script build * add hint * update readme * update copy model for snippet with link to styles --------- Co-authored-by: timothycarambat <rambat1010@gmail.com>
38 lines
1.6 KiB
SQL
38 lines
1.6 KiB
SQL
-- CreateTable
|
|
CREATE TABLE "embed_configs" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"uuid" TEXT NOT NULL,
|
|
"enabled" BOOLEAN NOT NULL DEFAULT false,
|
|
"chat_mode" TEXT NOT NULL DEFAULT 'query',
|
|
"allowlist_domains" TEXT,
|
|
"allow_model_override" BOOLEAN NOT NULL DEFAULT false,
|
|
"allow_temperature_override" BOOLEAN NOT NULL DEFAULT false,
|
|
"allow_prompt_override" BOOLEAN NOT NULL DEFAULT false,
|
|
"max_chats_per_day" INTEGER,
|
|
"max_chats_per_session" INTEGER,
|
|
"workspace_id" INTEGER NOT NULL,
|
|
"createdBy" INTEGER,
|
|
"usersId" INTEGER,
|
|
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
CONSTRAINT "embed_configs_workspace_id_fkey" FOREIGN KEY ("workspace_id") REFERENCES "workspaces" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT "embed_configs_usersId_fkey" FOREIGN KEY ("usersId") REFERENCES "users" ("id") ON DELETE SET NULL ON UPDATE CASCADE
|
|
);
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "embed_chats" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"prompt" TEXT NOT NULL,
|
|
"response" TEXT NOT NULL,
|
|
"session_id" TEXT NOT NULL,
|
|
"include" BOOLEAN NOT NULL DEFAULT true,
|
|
"connection_information" TEXT,
|
|
"embed_id" INTEGER NOT NULL,
|
|
"usersId" INTEGER,
|
|
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
CONSTRAINT "embed_chats_embed_id_fkey" FOREIGN KEY ("embed_id") REFERENCES "embed_configs" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT "embed_chats_usersId_fkey" FOREIGN KEY ("usersId") REFERENCES "users" ("id") ON DELETE SET NULL ON UPDATE CASCADE
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "embed_configs_uuid_key" ON "embed_configs"("uuid");
|