mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-21 15:01:03 +00:00
- Implemented Upstash Vector as a cloud-based storage solution for document chunks, replacing the local LanceDB option. - Added auto-detection of storage mode based on environment variables for seamless integration. - Updated the chat API to utilize the new retrieval mechanism, enhancing response accuracy and performance. - Enhanced README with setup instructions for Upstash and updated environment variable requirements. - Introduced new scripts and configurations for managing the vector index and API interactions.
18 lines
544 B
JavaScript
18 lines
544 B
JavaScript
/**
|
|
* Configuration for the docs-chat widget.
|
|
* Automatically selects API URL based on Mintlify environment.
|
|
*/
|
|
(() => {
|
|
const hostname = window.location.hostname;
|
|
|
|
// Mintlify local dev (mintlify dev runs on localhost)
|
|
if (hostname === "localhost" || hostname === "127.0.0.1") {
|
|
window.DOCS_CHAT_API_URL = "http://localhost:3001";
|
|
return;
|
|
}
|
|
|
|
// Production (docs.openclaw.ai and *.mintlify.app previews)
|
|
// TODO: Update this to the actual production URL
|
|
window.DOCS_CHAT_API_URL = "https://claw-api.openknot.ai";
|
|
})();
|