-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from mikepsinn/develop
Flows
- Loading branch information
Showing
8 changed files
with
9,292 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Chat Window Iframe Example</title> | ||
<style> | ||
/* Styles for the chat window */ | ||
#chat-window { | ||
position: fixed; | ||
right: 20px; | ||
bottom: 20px; | ||
width: 300px; | ||
height: 400px; | ||
border: 1px solid #ccc; | ||
z-index: 1000; | ||
box-shadow: 0 4px 8px rgba(0,0,0,0.1); | ||
display: none; /* Initially hidden */ | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div id="chat-window"></div> <!-- Placeholder for the chat window --> | ||
|
||
<script type="module"> | ||
import Chatbot from "https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js" | ||
Chatbot.init({ | ||
chatflowid: "3a2b0429-3878-490a-aff2-729cfa0007ef", | ||
apiHost: "https://fw.fdai.earth", | ||
chatflowConfig: { | ||
// topK: 2 | ||
}, | ||
theme: { | ||
button: { | ||
backgroundColor: "#3B81F6", | ||
right: 20, | ||
bottom: 20, | ||
size: "medium", | ||
iconColor: "white", | ||
customIconSrc: "https://raw.githubusercontent.com/FDA-AI/FDAi/develop/apps/dfda-1/public/app/public/img/robots/robot-head.svg", | ||
}, | ||
chatWindow: { | ||
welcomeMessage: "Hi! I'm your personal FDAi! How can I help you?", | ||
backgroundColor: "#ffffff", | ||
height: 700, | ||
width: 400, | ||
fontSize: 16, | ||
poweredByTextColor: "#ffffff", | ||
botMessage: { | ||
backgroundColor: "#f7f8ff", | ||
textColor: "#303235", | ||
showAvatar: true, | ||
avatarSrc: "https://raw.githubusercontent.com/FDA-AI/FDAi/develop/apps/dfda-1/public/app/public/img/robots/robot-head.svg", | ||
}, | ||
userMessage: { | ||
backgroundColor: "#3B81F6", | ||
textColor: "#ffffff", | ||
showAvatar: true, | ||
avatarSrc: "https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png", | ||
}, | ||
textInput: { | ||
placeholder: "Type your question", | ||
backgroundColor: "#ffffff", | ||
textColor: "#303235", | ||
sendButtonColor: "#3B81F6", | ||
} | ||
} | ||
} | ||
}) | ||
</script><script type="module"> | ||
import Chatbot from "https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js" | ||
Chatbot.init({ | ||
chatflowid: "3a2b0429-3878-490a-aff2-729cfa0007ef", | ||
apiHost: "https://fw.fdai.earth", | ||
chatflowConfig: { | ||
// topK: 2 | ||
}, | ||
theme: { | ||
button: { | ||
backgroundColor: "#3B81F6", | ||
right: 20, | ||
bottom: 20, | ||
size: "medium", | ||
iconColor: "white", | ||
customIconSrc: "https://raw.githubusercontent.com/FDA-AI/FDAi/develop/apps/dfda-1/public/app/public/img/robots/robot-head.svg", | ||
}, | ||
chatWindow: { | ||
welcomeMessage: "Hi! I'm your personal FDAi! How can I help you?", | ||
backgroundColor: "#ffffff", | ||
height: 700, | ||
width: 400, | ||
fontSize: 16, | ||
poweredByTextColor: "#ffffff", | ||
botMessage: { | ||
backgroundColor: "#f7f8ff", | ||
textColor: "#303235", | ||
showAvatar: true, | ||
avatarSrc: "https://raw.githubusercontent.com/FDA-AI/FDAi/develop/apps/dfda-1/public/app/public/img/robots/robot-head.svg", | ||
}, | ||
userMessage: { | ||
backgroundColor: "#3B81F6", | ||
textColor: "#ffffff", | ||
showAvatar: true, | ||
avatarSrc: "https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png", | ||
}, | ||
textInput: { | ||
placeholder: "Type your question", | ||
backgroundColor: "#ffffff", | ||
textColor: "#303235", | ||
sendButtonColor: "#3B81F6", | ||
} | ||
} | ||
} | ||
}) | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 132 additions & 0 deletions
132
apps/nextjs/prisma/migrations/20240408205952_init/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
-- CreateTable | ||
CREATE TABLE "accounts" ( | ||
"id" TEXT NOT NULL, | ||
"user_id" TEXT NOT NULL, | ||
"type" TEXT NOT NULL, | ||
"provider" TEXT NOT NULL, | ||
"provider_account_id" TEXT NOT NULL, | ||
"refresh_token" TEXT, | ||
"access_token" TEXT, | ||
"expires_at" INTEGER, | ||
"token_type" TEXT, | ||
"scope" TEXT, | ||
"id_token" TEXT, | ||
"session_state" TEXT, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "accounts_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "sessions" ( | ||
"id" TEXT NOT NULL, | ||
"session_token" TEXT NOT NULL, | ||
"user_id" TEXT NOT NULL, | ||
"expires" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "sessions_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "users" ( | ||
"id" TEXT NOT NULL, | ||
"fdai_user_id" INTEGER, | ||
"fdai_access_token" TEXT, | ||
"fdai_refresh_token" TEXT, | ||
"fdai_expires_in" INTEGER, | ||
"fdai_scope" TEXT, | ||
"fdai_access_token_expires_at" TIMESTAMP(3), | ||
"address" TEXT, | ||
"banned" BOOLEAN, | ||
"birthday" TIMESTAMP(3), | ||
"city" TEXT, | ||
"country_code" TEXT, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"deleted_at" TIMESTAMP(3), | ||
"email" TEXT, | ||
"email_verified" TIMESTAMP(3), | ||
"email_validated" BOOLEAN NOT NULL DEFAULT false, | ||
"first_name" TEXT, | ||
"gdpr_consent" BOOLEAN NOT NULL DEFAULT false, | ||
"gender" TEXT, | ||
"image" TEXT, | ||
"ip_address" VARCHAR(45), | ||
"language" TEXT, | ||
"last_name" TEXT, | ||
"last_sign_in_at" BIGINT, | ||
"name" TEXT, | ||
"newsletter_subscribed" BOOLEAN NOT NULL DEFAULT false, | ||
"phone_number" TEXT, | ||
"postal_code" TEXT, | ||
"referrer_user_id" TEXT, | ||
"state_province" TEXT, | ||
"updated_at" TIMESTAMP(3) NOT NULL, | ||
"username" TEXT NOT NULL, | ||
"web3_wallet" TEXT, | ||
"unsafe_metadata" JSONB, | ||
"public_metadata" JSONB, | ||
"private_metadata" JSONB, | ||
|
||
CONSTRAINT "users_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "verification_tokens" ( | ||
"identifier" TEXT NOT NULL, | ||
"token" TEXT NOT NULL, | ||
"expires" TIMESTAMP(3) NOT NULL | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "activities" ( | ||
"id" TEXT NOT NULL, | ||
"user_id" TEXT NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"description" TEXT, | ||
"color_code" TEXT NOT NULL, | ||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated_at" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "activities_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "activity_log" ( | ||
"id" TEXT NOT NULL, | ||
"activity_id" TEXT NOT NULL, | ||
"date" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"count" INTEGER NOT NULL DEFAULT 1, | ||
|
||
CONSTRAINT "activity_log_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "accounts_provider_provider_account_id_key" ON "accounts"("provider", "provider_account_id"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "sessions_session_token_key" ON "sessions"("session_token"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "users_email_key" ON "users"("email"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "users_username_key" ON "users"("username"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "verification_tokens_token_key" ON "verification_tokens"("token"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "verification_tokens_identifier_token_key" ON "verification_tokens"("identifier", "token"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "accounts" ADD CONSTRAINT "accounts_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "activities" ADD CONSTRAINT "activities_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "activity_log" ADD CONSTRAINT "activity_log_activity_id_fkey" FOREIGN KEY ("activity_id") REFERENCES "activities"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "postgresql" |
Oops, something went wrong.