+
+Here're some of the project's features:
+
+- Generate FAQs from Text via Pasting: Paste the text to into the text box, then click 'Generate FAQ' to produce a condensed FAQ of the content, which will be displayed in the 'FAQ' box below.
+
+- Generate FAQs from Text via txt file Upload: Upload the file in the Upload bar, then click 'Generate FAQ' to produce a condensed FAQ of the content, which will be displayed in the 'FAQ' box below.
+
+
+
+Here're some of the project's features:
+
+- Generate FAQs from Text via Pasting: Paste the text to into the text box, then click 'Generate FAQ' to produce a condensed FAQ of the content, which will be displayed in the 'FAQ' box on the right.
+
+- Scroll to Bottom: The FAQ content will automatically scroll to the bottom.
+
+
🛠️ Get it Running:
+
+1. Clone the repo.
+
+2. cd command to the current folder.
+
+3. Modify the required .env variables.
+ ```
+ BASIC_URL = ''
+ ```
+4. Execute `npm install` to install the corresponding dependencies.
+
+5. Execute `npm run dev` in both environments
diff --git a/FaqGen/docker/ui/svelte/package.json b/FaqGen/docker/ui/svelte/package.json
new file mode 100644
index 000000000..2f923965b
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "doc-faq",
+ "version": "0.0.1",
+ "scripts": {
+ "dev": "vite dev",
+ "build": "vite build && npm run package",
+ "preview": "vite preview",
+ "package": "svelte-kit sync && svelte-package && publint",
+ "prepublishOnly": "npm run package",
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
+ },
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "svelte": "./dist/index.js"
+ }
+ },
+ "files": [
+ "dist",
+ "!dist/**/*.test.*",
+ "!dist/**/*.spec.*"
+ ],
+ "peerDependencies": {
+ "svelte": "^4.0.0"
+ },
+ "devDependencies": {
+ "@playwright/test": "^1.44.1",
+ "@sveltejs/adapter-auto": "^3.0.0",
+ "@sveltejs/kit": "^2.0.0",
+ "@sveltejs/package": "^2.0.0",
+ "@sveltejs/vite-plugin-svelte": "^3.0.0",
+ "autoprefixer": "^10.4.16",
+ "flowbite": "^2.3.0",
+ "flowbite-svelte": "^0.38.5",
+ "flowbite-svelte-icons": "^1.4.0",
+ "postcss": "^8.4.32",
+ "postcss-load-config": "^5.0.2",
+ "publint": "^0.1.9",
+ "svelte": "^4.2.7",
+ "svelte-check": "^3.6.0",
+ "tailwindcss": "^3.3.6",
+ "tslib": "^2.4.1",
+ "typescript": "^5.0.0",
+ "vite": "^5.0.11"
+ },
+ "svelte": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "type": "module",
+ "dependencies": {
+ "playwright": "^1.44.0",
+ "sse.js": "^0.6.1",
+ "svelte-notifications": "^0.9.98"
+ }
+}
diff --git a/FaqGen/docker/ui/svelte/playwright.config.ts b/FaqGen/docker/ui/svelte/playwright.config.ts
new file mode 100644
index 000000000..032caa100
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/playwright.config.ts
@@ -0,0 +1,54 @@
+// Copyright (C) 2024 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+
+import { defineConfig, devices } from "@playwright/test";
+
+/**
+ * Read environment variables from file.
+ * https://github.com/motdotla/dotenv
+ */
+// require('dotenv').config();
+
+/**
+ * See https://playwright.dev/docs/test-configuration.
+ */
+export default defineConfig({
+ testDir: "./tests",
+ /* Maximum time one test can run for. */
+ timeout: 30 * 1000,
+ expect: {
+ /**
+ * Maximum time expect() should wait for the condition to be met.
+ * For example in `await expect(locator).toHaveText();`
+ */
+ timeout: 5000,
+ },
+ /* Run tests in files in parallel */
+ fullyParallel: true,
+ /* Fail the build on CI if you accidentally left test.only in the source code. */
+ forbidOnly: !!process.env.CI,
+ /* Retry on CI only */
+ retries: process.env.CI ? 2 : 0,
+ /* Opt out of parallel tests on CI. */
+ workers: process.env.CI ? 1 : undefined,
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
+ reporter: [["html", { open: "never" }]],
+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
+ use: {
+ /* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
+ actionTimeout: 0,
+ /* Base URL to use in actions like `await page.goto('/')`. */
+ baseURL: "http://localhost:5173",
+
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
+ trace: "on-first-retry",
+ },
+
+ /* Configure projects for major browsers */
+ projects: [
+ {
+ name: "webkit",
+ use: { ...devices["Desktop Safari"] },
+ },
+ ],
+});
diff --git a/FaqGen/docker/ui/svelte/postcss.config.cjs b/FaqGen/docker/ui/svelte/postcss.config.cjs
new file mode 100644
index 000000000..5f822bcb1
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/postcss.config.cjs
@@ -0,0 +1,27 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+const tailwindcss = require("tailwindcss");
+const autoprefixer = require("autoprefixer");
+
+const config = {
+ plugins: [
+ //Some plugins, like tailwindcss/nesting, need to run before Tailwind,
+ tailwindcss(),
+ //But others, like autoprefixer, need to run after,
+ autoprefixer,
+ ],
+};
+
+module.exports = config;
diff --git a/FaqGen/docker/ui/svelte/src/app.d.ts b/FaqGen/docker/ui/svelte/src/app.d.ts
new file mode 100644
index 000000000..1b9de033b
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/app.d.ts
@@ -0,0 +1,27 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// See https://kit.svelte.dev/docs/types#app
+// for information about these interfaces
+declare global {
+ namespace App {
+ // interface Error {}
+ // interface Locals {}
+ // interface PageData {}
+ // interface PageState {}
+ // interface Platform {}
+ }
+}
+
+export {};
diff --git a/FaqGen/docker/ui/svelte/src/app.html b/FaqGen/docker/ui/svelte/src/app.html
new file mode 100644
index 000000000..cdcef542d
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/app.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+ %sveltekit.head%
+
+
+
%sveltekit.body%
+
+
diff --git a/FaqGen/docker/ui/svelte/src/app.pcss b/FaqGen/docker/ui/svelte/src/app.pcss
new file mode 100644
index 000000000..1a7b7cf38
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/app.pcss
@@ -0,0 +1,4 @@
+/* Write your global styles here, in PostCSS syntax */
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
diff --git a/FaqGen/docker/ui/svelte/src/lib/assets/faqLogo.svelte b/FaqGen/docker/ui/svelte/src/lib/assets/faqLogo.svelte
new file mode 100644
index 000000000..93a32c83d
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/assets/faqLogo.svelte
@@ -0,0 +1,30 @@
+
+
+
diff --git a/FaqGen/docker/ui/svelte/src/lib/assets/imgLogo.svelte b/FaqGen/docker/ui/svelte/src/lib/assets/imgLogo.svelte
new file mode 100644
index 000000000..b5a8b7fbe
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/assets/imgLogo.svelte
@@ -0,0 +1,17 @@
+
+
+
diff --git a/FaqGen/docker/ui/svelte/src/lib/assets/intelLogo.svelte b/FaqGen/docker/ui/svelte/src/lib/assets/intelLogo.svelte
new file mode 100644
index 000000000..50039d5b3
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/assets/intelLogo.svelte
@@ -0,0 +1,49 @@
+
+
+
diff --git a/FaqGen/docker/ui/svelte/src/lib/assets/loadingAnimation.svelte b/FaqGen/docker/ui/svelte/src/lib/assets/loadingAnimation.svelte
new file mode 100644
index 000000000..713eccc54
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/assets/loadingAnimation.svelte
@@ -0,0 +1,48 @@
+
+
+
+
diff --git a/FaqGen/docker/ui/svelte/src/lib/faq.svelte b/FaqGen/docker/ui/svelte/src/lib/faq.svelte
new file mode 100644
index 000000000..7cfd1bba3
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/faq.svelte
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
diff --git a/FaqGen/docker/ui/svelte/src/lib/header.svelte b/FaqGen/docker/ui/svelte/src/lib/header.svelte
new file mode 100644
index 000000000..07e2dec3e
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/header.svelte
@@ -0,0 +1,33 @@
+
+
+
+
+
+
diff --git a/FaqGen/docker/ui/svelte/src/lib/index.ts b/FaqGen/docker/ui/svelte/src/lib/index.ts
new file mode 100644
index 000000000..d3018cb48
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/index.ts
@@ -0,0 +1,15 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Reexport your entry components here
diff --git a/FaqGen/docker/ui/svelte/src/lib/shared/Network.ts b/FaqGen/docker/ui/svelte/src/lib/shared/Network.ts
new file mode 100644
index 000000000..2a54113e0
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/shared/Network.ts
@@ -0,0 +1,61 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import { SSE } from "sse.js";
+import { env } from "$env/dynamic/public";
+
+const DOC_BASE_URL = env.DOC_BASE_URL;
+
+async function fetchPostRes(url, init) {
+ try {
+ const response = await fetch(url, init);
+ if (!response.ok) throw response.status;
+ return await response.json();
+ } catch (error) {
+ console.error("network error: ", error);
+ return undefined;
+ }
+}
+
+export async function fetchKnowledgeBaseId(file: Blob, fileName: string) {
+ const url = `${DOC_BASE_URL}/doc_upload`;
+ const formData = new FormData();
+ formData.append("file", file, fileName);
+
+ const init: RequestInit = {
+ method: "POST",
+ body: formData,
+ };
+
+ return fetchPostRes(url, init);
+}
+
+export async function fetchTextStream(query: string, urlSuffix: string, params: string) {
+ let payload = {};
+ let url = "";
+ if (params === "doc_id") {
+ payload = { doc_id: query };
+ url = ``;
+ } else if (params === "text") {
+ payload = { messages: query };
+ url = `${DOC_BASE_URL}`;
+ }
+
+ console.log("url", url);
+
+ return new SSE(url, {
+ headers: { "Content-Type": "application/json" },
+ payload: JSON.stringify(payload),
+ });
+}
diff --git a/FaqGen/docker/ui/svelte/src/lib/shared/Store.ts b/FaqGen/docker/ui/svelte/src/lib/shared/Store.ts
new file mode 100644
index 000000000..99d1605e3
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/shared/Store.ts
@@ -0,0 +1,19 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import { writable } from "svelte/store";
+
+export let kb_id = writable("");
+
+export let loading = writable(false);
diff --git a/FaqGen/docker/ui/svelte/src/lib/shared/Utils.ts b/FaqGen/docker/ui/svelte/src/lib/shared/Utils.ts
new file mode 100644
index 000000000..bae0543f6
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/lib/shared/Utils.ts
@@ -0,0 +1,26 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+export function scrollToBottom(scrollToDiv: HTMLElement) {
+ if (scrollToDiv) {
+ setTimeout(
+ () =>
+ scrollToDiv.scroll({
+ behavior: "auto",
+ top: scrollToDiv.scrollHeight,
+ }),
+ 100,
+ );
+ }
+}
diff --git a/FaqGen/docker/ui/svelte/src/routes/+layout.svelte b/FaqGen/docker/ui/svelte/src/routes/+layout.svelte
new file mode 100644
index 000000000..9a09eaadf
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/routes/+layout.svelte
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
diff --git a/FaqGen/docker/ui/svelte/src/routes/+page.svelte b/FaqGen/docker/ui/svelte/src/routes/+page.svelte
new file mode 100644
index 000000000..40ef665b5
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/src/routes/+page.svelte
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+ Please upload file or paste content for FAQ Generation.
+
+
+
+
+
+
+
+
+
+
diff --git a/FaqGen/docker/ui/svelte/static/favicon.png b/FaqGen/docker/ui/svelte/static/favicon.png
new file mode 100644
index 000000000..75b997f81
Binary files /dev/null and b/FaqGen/docker/ui/svelte/static/favicon.png differ
diff --git a/FaqGen/docker/ui/svelte/svelte.config.js b/FaqGen/docker/ui/svelte/svelte.config.js
new file mode 100644
index 000000000..35740d5e8
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/svelte.config.js
@@ -0,0 +1,35 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import adapter from "@sveltejs/adapter-auto";
+import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
+
+/** @type {import('@sveltejs/kit').Config} */
+const config = {
+ // Consult https://kit.svelte.dev/docs/integrations#preprocessors
+ // for more information about preprocessors
+ preprocess: [vitePreprocess({})],
+
+ kit: {
+ // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
+ // If your environment is not supported or you settled on a specific environment, switch out the adapter.
+ // See https://kit.svelte.dev/docs/adapters for more information about adapters.
+ adapter: adapter(),
+ env: {
+ publicPrefix: "",
+ },
+ },
+};
+
+export default config;
diff --git a/FaqGen/docker/ui/svelte/tailwind.config.cjs b/FaqGen/docker/ui/svelte/tailwind.config.cjs
new file mode 100644
index 000000000..469db3355
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/tailwind.config.cjs
@@ -0,0 +1,43 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+const config = {
+ content: ["./src/**/*.{html,js,svelte,ts}", "./node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}"],
+
+ plugins: [require("flowbite/plugin")],
+
+ darkMode: "class",
+
+ theme: {
+ extend: {
+ colors: {
+ // flowbite-svelte
+ primary: {
+ 50: "#f2f8ff",
+ 100: "#eef5ff",
+ 200: "#deecff",
+ 300: "#cce2ff",
+ 400: "#add0ff",
+ 500: "#5da2fe",
+ 600: "#2f81ef",
+ 700: "#2780eb",
+ 800: "#226fcc",
+ 900: "#1b5aa5",
+ },
+ },
+ },
+ },
+};
+
+module.exports = config;
diff --git a/FaqGen/docker/ui/svelte/tests/faqGen.spec.ts b/FaqGen/docker/ui/svelte/tests/faqGen.spec.ts
new file mode 100644
index 000000000..fcfe0a00a
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/tests/faqGen.spec.ts
@@ -0,0 +1,31 @@
+// Copyright (C) 2024 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+
+import { test, expect, type Page } from "@playwright/test";
+
+// Initialization before each test
+test.beforeEach(async ({ page }) => {
+ await page.goto("/");
+});
+
+// Constants definition
+const CHAT_ITEMS = ["What is the total revenue of Nike in 2023?"];
+const placeholderText = "Upload or paste content on the left.";
+
+// Helper function: Enter message to chat
+async function enterMessageToChat(page: Page, message: string) {
+ await page.getByTestId("sum-input").click();
+ await page.getByTestId("sum-input").fill(message);
+ await page.waitForTimeout(10000);
+ await page.getByTestId("sum-click").click();
+ await page.waitForTimeout(10000);
+ await expect(page.getByTestId("display-answer")).not.toBeEmpty();
+}
+
+// Test description: New Doc Faq
+test.describe("New FAQ Gen", () => {
+ // Test: Enter message to faq
+ test("should enter message to faq", async ({ page }) => {
+ await enterMessageToChat(page, CHAT_ITEMS[0]);
+ });
+});
diff --git a/FaqGen/docker/ui/svelte/tsconfig.json b/FaqGen/docker/ui/svelte/tsconfig.json
new file mode 100644
index 000000000..8ed3dd7f2
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "extends": "./.svelte-kit/tsconfig.json",
+ "compilerOptions": {
+ "allowJs": true,
+ "checkJs": true,
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "resolveJsonModule": true,
+ "skipLibCheck": true,
+ "sourceMap": true,
+ "strict": true,
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext"
+ }
+}
diff --git a/FaqGen/docker/ui/svelte/vite.config.ts b/FaqGen/docker/ui/svelte/vite.config.ts
new file mode 100644
index 000000000..eaa8566dd
--- /dev/null
+++ b/FaqGen/docker/ui/svelte/vite.config.ts
@@ -0,0 +1,23 @@
+// Copyright (c) 2024 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import { sveltekit } from "@sveltejs/kit/vite";
+import type { UserConfig } from "vite";
+
+const config: UserConfig = {
+ plugins: [sveltekit()],
+ server: {},
+};
+
+export default config;
diff --git a/FaqGen/docker/xeon/README.md b/FaqGen/docker/xeon/README.md
new file mode 100644
index 000000000..05224284c
--- /dev/null
+++ b/FaqGen/docker/xeon/README.md
@@ -0,0 +1,172 @@
+# Build Mega Service of FAQ Generation on Intel Xeon Processor
+
+This document outlines the deployment process for a FAQ Generation application utilizing the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline on an Intel Xeon server. The steps include Docker image creation, container deployment via Docker Compose, and service execution to integrate microservices such as `llm`. We will publish the Docker images to Docker Hub soon, which will simplify the deployment process for this service.
+
+## 🚀 Apply Intel Xeon Server on AWS
+
+To apply a Intel Xeon server on AWS, start by creating an AWS account if you don't have one already. Then, head to the [EC2 Console](https://console.aws.amazon.com/ec2/v2/home) to begin the process. Within the EC2 service, select the Amazon EC2 M7i or M7i-flex instance type to leverage the power of 4th Generation Intel Xeon Scalable processors. These instances are optimized for high-performance computing and demanding workloads.
+
+For detailed information about these instance types, you can refer to this [link](https://aws.amazon.com/ec2/instance-types/m7i/). Once you've chosen the appropriate instance type, proceed with configuring your instance settings, including network configurations, security groups, and storage options.
+
+After launching your instance, you can connect to it using SSH (for Linux instances) or Remote Desktop Protocol (RDP) (for Windows instances). From there, you'll have full access to your Xeon server, allowing you to install, configure, and manage your applications as needed.
+
+## 🚀 Build Docker Images
+
+First of all, you need to build Docker Images locally. This step can be ignored once the Docker images are published to Docker hub.
+
+```bash
+git clone https://github.com/opea-project/GenAIComps.git
+cd GenAIComps
+```
+
+### 1. Build LLM Image
+
+```bash
+docker build -t opea/llm-faqgen-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/faq-generation/tgi/Dockerfile .
+```
+
+### 2. Build MegaService Docker Image
+
+To construct the Mega Service, we utilize the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline within the `faqgen.py` Python script. Build the MegaService Docker image via below command:
+
+```bash
+git clone https://github.com/opea-project/GenAIExamples
+cd GenAIExamples/FaqGen/docker/
+docker build --no-cache -t opea/faqgen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f GenAIExamples/FaqGen/docker/Dockerfile .
+```
+
+### 3. Build UI Docker Image
+
+Build the frontend Docker image via below command:
+
+```bash
+cd GenAIExamples/FaqGen/docker/ui/
+docker build -t opea/faqgen-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .
+```
+
+### 4. Build react UI Docker Image (Optional)
+
+Build the frontend Docker image based on react framework via below command:
+
+```bash
+cd GenAIExamples/FaqGen/docker/ui
+export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/faqgen"
+docker build -t opea/faqgen-react-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy --build-arg BACKEND_SERVICE_ENDPOINT=$BACKEND_SERVICE_ENDPOINT -f ./docker/Dockerfile.react .
+```
+
+Then run the command `docker images`, you will have the following Docker Images:
+
+1. `opea/llm-faqgen-tgi:latest`
+2. `opea/faqgen:latest`
+3. `opea/faqgen-ui:latest`
+4. `opea/faqgen-react-ui:latest`
+
+## 🚀 Start Microservices and MegaService
+
+### Setup Environment Variables
+
+Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+
+```bash
+export no_proxy=${your_no_proxy}
+export http_proxy=${your_http_proxy}
+export https_proxy=${your_http_proxy}
+export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
+export TGI_LLM_ENDPOINT="http://${your_ip}:8008"
+export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token}
+export MEGA_SERVICE_HOST_IP=${host_ip}
+export LLM_SERVICE_HOST_IP=${host_ip}
+export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/faqgen"
+```
+
+Note: Please replace with `host_ip` with your external IP address, do not use localhost.
+
+### Start Microservice Docker Containers
+
+```bash
+cd GenAIExamples/FaqGen/docker/xeon
+docker compose -f docker_compose.yaml up -d
+```
+
+### Validate Microservices
+
+1. TGI Service
+
+```bash
+curl http://${host_ip}:8008/generate \
+ -X POST \
+ -d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}' \
+ -H 'Content-Type: application/json'
+```
+
+2. LLM Microservice
+
+```bash
+curl http://${host_ip}:9000/v1/faqgen \
+ -X POST \
+ -d '{"query":"Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}' \
+ -H 'Content-Type: application/json'
+```
+
+3. MegaService
+
+```bash
+curl http://${host_ip}:8888/v1/faqgen -H "Content-Type: application/json" -d '{
+ "messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."
+ }'
+```
+
+Following the validation of all aforementioned microservices, we are now prepared to construct a mega-service.
+
+## Enable LangSmith to Monitor an Application (Optional)
+
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+
+Here's how you can do it:
+
+1. Install the latest version of LangSmith:
+
+```bash
+pip install -U langsmith
+```
+
+2. Set the necessary environment variables:
+
+```bash
+export LANGCHAIN_TRACING_V2=true
+export LANGCHAIN_API_KEY=ls_...
+```
+
+## 🚀 Launch the UI
+
+Open this URL `http://{host_ip}:5173` in your browser to access the frontend.
+
+![project-screenshot](../../assets/img/faqgen_ui_text.png)
+
+## 🚀 Launch the React UI (Optional)
+
+To access the FAQGen (react based) frontend, modify the UI service in the `docker_compose.yaml` file. Replace `faqgen-xeon-ui-server` service with the `faqgen-xeon-react-ui-server` service as per the config below:
+
+```bash
+ faqgen-xeon-react-ui-server:
+ image: opea/faqgen-react-ui:latest
+ container_name: faqgen-xeon-react-ui-server
+ environment:
+ - no_proxy=${no_proxy}
+ - https_proxy=${https_proxy}
+ - http_proxy=${http_proxy}
+ ports:
+ - 5174:80
+ depends_on:
+ - faqgen-xeon-backend-server
+ ipc: host
+ restart: always
+```
+
+Open this URL `http://{host_ip}:5174` in your browser to access the react based frontend.
+
+- Create FAQs from Text input
+ ![project-screenshot](../../assets/img/faqgen_react_ui_text.png)
+
+- Create FAQs from Text Files
+ ![project-screenshot](../../assets/img/faqgen_react_ui_text_files.png)
diff --git a/FaqGen/docker/xeon/docker_compose.yaml b/FaqGen/docker/xeon/docker_compose.yaml
new file mode 100644
index 000000000..280adab8a
--- /dev/null
+++ b/FaqGen/docker/xeon/docker_compose.yaml
@@ -0,0 +1,72 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+version: "3.8"
+
+services:
+ tgi_service:
+ image: ghcr.io/huggingface/text-generation-inference:1.4
+ container_name: tgi_xeon_server
+ ports:
+ - "8008:80"
+ environment:
+ no_proxy: ${no_proxy}
+ http_proxy: ${http_proxy}
+ https_proxy: ${https_proxy}
+ TGI_LLM_ENDPOINT: ${TGI_LLM_ENDPOINT}
+ HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+ volumes:
+ - "./data:/data"
+ shm_size: 1g
+ command: --model-id ${LLM_MODEL_ID}
+ llm_faqgen:
+ image: opea/llm-faqgen-tgi:latest
+ container_name: llm-faqgen-server
+ depends_on:
+ - tgi_service
+ ports:
+ - "9000:9000"
+ ipc: host
+ environment:
+ no_proxy: ${no_proxy}
+ http_proxy: ${http_proxy}
+ https_proxy: ${https_proxy}
+ TGI_LLM_ENDPOINT: ${TGI_LLM_ENDPOINT}
+ HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+ LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
+ LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
+ LANGCHAIN_PROJECT: "opea-llm-service"
+ restart: unless-stopped
+ faqgen-xeon-backend-server:
+ image: opea/faqgen:latest
+ container_name: faqgen-xeon-backend-server
+ depends_on:
+ - tgi_service
+ - llm_faqgen
+ ports:
+ - "8888:8888"
+ environment:
+ - no_proxy=${no_proxy}
+ - https_proxy=${https_proxy}
+ - http_proxy=${http_proxy}
+ - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP}
+ - LLM_SERVICE_HOST_IP=${LLM_SERVICE_HOST_IP}
+ ipc: host
+ restart: always
+ faqgen-xeon-ui-server:
+ image: opea/faqgen-ui:latest
+ container_name: faqgen-xeon-ui-server
+ depends_on:
+ - faqgen-xeon-backend-server
+ ports:
+ - "5173:5173"
+ environment:
+ - no_proxy=${no_proxy}
+ - https_proxy=${https_proxy}
+ - http_proxy=${http_proxy}
+ - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
+ ipc: host
+ restart: always
+networks:
+ default:
+ driver: bridge
diff --git a/FaqGen/faqgen.yaml b/FaqGen/faqgen.yaml
new file mode 100644
index 000000000..02a675959
--- /dev/null
+++ b/FaqGen/faqgen.yaml
@@ -0,0 +1,44 @@
+
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+opea_micro_services:
+ tgi_service:
+ host: ${TGI_SERVICE_IP}
+ ports: ${TGI_SERVICE_PORT}
+ image: ghcr.io/huggingface/tgi-gaudi:1.2.1
+ volumes:
+ - "./data:/data"
+ runtime: habana
+ cap_add:
+ - SYS_NICE
+ ipc: host
+ environment:
+ HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+ HABANA_VISIBLE_DEVICES: all
+ OMPI_MCA_btl_vader_single_copy_mechanism: none
+ HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+ model-id: ${LLM_MODEL_ID}
+ llm:
+ host: ${LLM_SERVICE_HOST_IP}
+ ports: ${LLM_SERVICE_PORT}
+ image: opea/llm-tgi:latest
+ endpoint: /v1/chat/completions
+ environment:
+ TGI_LLM_ENDPOINT: ${TGI_LLM_ENDPOINT}
+ HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+ ui:
+ host: ${UI_SERVICE_HOST_IP}
+ ports:
+ - "5173:5173"
+ image: opea/faqgen-ui:latest
+ environment:
+ - CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
+
+opea_mega_service:
+ host: ${MEGA_SERVICE_HOST_IP}
+ ports: ${MEGA_SERVICE_PORT}
+ image: opea/faqgen:latest
+ endpoint: /v1/faqgen
+ mega_flow:
+ - llm
diff --git a/FaqGen/kubernetes/README.md b/FaqGen/kubernetes/README.md
new file mode 100644
index 000000000..e69de29bb
diff --git a/FaqGen/kubernetes/faqgen_gaudi.yaml b/FaqGen/kubernetes/faqgen_gaudi.yaml
new file mode 100644
index 000000000..6b10cf2ad
--- /dev/null
+++ b/FaqGen/kubernetes/faqgen_gaudi.yaml
@@ -0,0 +1,35 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+ labels:
+ app.kubernetes.io/name: gmconnector
+ app.kubernetes.io/managed-by: kustomize
+ gmc/platform: gaudi
+ name: faqgen
+ namespace: faqgen
+spec:
+ routerConfig:
+ name: router
+ serviceName: router-service
+ nodes:
+ root:
+ routerType: Sequence
+ steps:
+ - name: FaqGenGaudi
+ data: $response
+ internalService:
+ serviceName: faqgen-llm-uservice
+ config:
+ endpoint: /v1/chat/faqgen
+ PORT: "9009"
+ - name: TgiGaudi
+ internalService:
+ serviceName: tgi-gaudi-svc
+ config:
+ LANGCHAIN_TRACING_V2: "false"
+ LANGCHAIN_PROJECT: "opea-llm-service"
+ endpoint: /generate
+ isDownstreamService: true
diff --git a/FaqGen/kubernetes/faqgen_xeon.yaml b/FaqGen/kubernetes/faqgen_xeon.yaml
new file mode 100644
index 000000000..24c6f06e5
--- /dev/null
+++ b/FaqGen/kubernetes/faqgen_xeon.yaml
@@ -0,0 +1,35 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+ labels:
+ app.kubernetes.io/name: gmconnector
+ app.kubernetes.io/managed-by: kustomize
+ gmc/platform: xeon
+ name: faqgen
+ namespace: faqgen
+spec:
+ routerConfig:
+ name: router
+ serviceName: router-service
+ nodes:
+ root:
+ routerType: Sequence
+ steps:
+ - name: FaqGen
+ data: $response
+ internalService:
+ serviceName: faqgen-llm-uservice
+ config:
+ endpoint: /v1/chat/faqgen
+ PORT: "9009"
+ - name: Tgi
+ internalService:
+ serviceName: tgi-svc
+ config:
+ LANGCHAIN_TRACING_V2: "false"
+ LANGCHAIN_PROJECT: "opea-llm-service"
+ endpoint: /generate
+ isDownstreamService: true
diff --git a/FaqGen/kubernetes/helm-charts/README.md b/FaqGen/kubernetes/helm-charts/README.md
new file mode 100644
index 000000000..e69de29bb
diff --git a/FaqGen/kubernetes/manifests/README.md b/FaqGen/kubernetes/manifests/README.md
new file mode 100644
index 000000000..3c1429f5e
--- /dev/null
+++ b/FaqGen/kubernetes/manifests/README.md
@@ -0,0 +1,35 @@
+