mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-11 01:10:11 +01:00
a5bb77f97a
V1 of agent support via built-in `@agent` that can be invoked alongside normal workspace RAG chat.
25 lines
1.1 KiB
SQL
25 lines
1.1 KiB
SQL
-- AlterTable
|
|
ALTER TABLE "workspaces" ADD COLUMN "agentModel" TEXT;
|
|
ALTER TABLE "workspaces" ADD COLUMN "agentProvider" TEXT;
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "workspace_agent_invocations" (
|
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
"uuid" TEXT NOT NULL,
|
|
"prompt" TEXT NOT NULL,
|
|
"closed" BOOLEAN NOT NULL DEFAULT false,
|
|
"user_id" INTEGER,
|
|
"thread_id" INTEGER,
|
|
"workspace_id" INTEGER NOT NULL,
|
|
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"lastUpdatedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
CONSTRAINT "workspace_agent_invocations_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
CONSTRAINT "workspace_agent_invocations_workspace_id_fkey" FOREIGN KEY ("workspace_id") REFERENCES "workspaces" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "workspace_agent_invocations_uuid_key" ON "workspace_agent_invocations"("uuid");
|
|
|
|
-- CreateIndex
|
|
CREATE INDEX "workspace_agent_invocations_uuid_idx" ON "workspace_agent_invocations"("uuid");
|