From 87b5a644a58bf06de4029f2b4631362b46c69981 Mon Sep 17 00:00:00 2001 From: ramnique <30795890+ramnique@users.noreply.github.com> Date: Mon, 10 Mar 2025 14:20:14 +0530 Subject: [PATCH 1/2] fix readme link --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 143966d1..0ba1dccc 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ See the relevant sections below for details on each service. - [Local Development Setup](#local-development-setup) - [Python SDK](#option-1-python-sdk) - [HTTP API](#option-2-http-api) -- [Optional Features](#optional-features) +- [Optional Features](#enable-rag) - [Enable RAG](#enable-rag) - [URL Scraping](#url-scraping) - [File Uploads](#file-uploads) @@ -385,4 +385,4 @@ The webhook service handles all the security and parameter validation, allowing - If the sign-in button does not appear in the UI, ensure the Auth0 domain in your `.env` file is prefixed with `https://`. ## Attribution -Our agents framework is built on top of [OpenAI Swarm](https://github.com/openai/swarm) with custom enhancements and improvements. Check the [NOTICE](https://github.com/rowboatlabs/rowboat/blob/main/apps/agents/NOTICE.md) for attribution and license. \ No newline at end of file +Our agents framework is built on top of [OpenAI Swarm](https://github.com/openai/swarm) with custom enhancements and improvements. Check the [NOTICE](https://github.com/rowboatlabs/rowboat/blob/main/apps/agents/NOTICE.md) for attribution and license. From e8c2708c6368abcf460949965bbabf117e0f5543 Mon Sep 17 00:00:00 2001 From: ramnique <30795890+ramnique@users.noreply.github.com> Date: Mon, 10 Mar 2025 14:31:23 +0530 Subject: [PATCH 2/2] fix chat-widget bootstrap loading --- apps/chat_widget/app/api/bootstrap.js/route.ts | 16 ++++------------ .../bootstrap.template.js} | 0 2 files changed, 4 insertions(+), 12 deletions(-) rename apps/chat_widget/{app/api/bootstrap.js/bootstrap.js => public/bootstrap.template.js} (100%) diff --git a/apps/chat_widget/app/api/bootstrap.js/route.ts b/apps/chat_widget/app/api/bootstrap.js/route.ts index d2df0406..b59ec71f 100644 --- a/apps/chat_widget/app/api/bootstrap.js/route.ts +++ b/apps/chat_widget/app/api/bootstrap.js/route.ts @@ -1,21 +1,13 @@ -import { promises as fs } from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; - export const dynamic = 'force-dynamic' -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - -// Read the file once when the module loads -const jsFileContents = fs.readFile( - path.join(__dirname, 'bootstrap.js'), - 'utf-8' -); +// Fetch template once when module loads +const templatePromise = fetch(process.env.CHAT_WIDGET_HOST + '/bootstrap.template.js') + .then(res => res.text()); export async function GET() { try { // Reuse the cached content - const template = await jsFileContents; + const template = await templatePromise; // Replace placeholder values with actual URLs const contents = template diff --git a/apps/chat_widget/app/api/bootstrap.js/bootstrap.js b/apps/chat_widget/public/bootstrap.template.js similarity index 100% rename from apps/chat_widget/app/api/bootstrap.js/bootstrap.js rename to apps/chat_widget/public/bootstrap.template.js