From c5801d3215a0969bcf90fb2d882775302cd92f19 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Mon, 8 Dec 2025 00:13:38 +0100 Subject: added AIShield config page for chat access settings. Also added chat to top menu in case that was wanted by the user. Also added the AILab to the main menu. --- htroot/AILab.html | 16 +- htroot/AIShield_p.html | 204 +++++++++++++++++++++++ htroot/ConfigSearchPage_p.html | 2 +- htroot/Status.html | 2 + htroot/env/templates/header.template | 30 +++- htroot/env/templates/simpleSearchHeader.template | 1 + htroot/env/templates/simpleheader.template | 1 + htroot/env/templates/submenuAI.template | 1 + htroot/yacychat.html | 13 +- 9 files changed, 250 insertions(+), 20 deletions(-) create mode 100644 htroot/AIShield_p.html (limited to 'htroot') diff --git a/htroot/AILab.html b/htroot/AILab.html index cbf330393..caa89d83b 100644 --- a/htroot/AILab.html +++ b/htroot/AILab.html @@ -313,18 +313,18 @@ Needs setup

Define a shield

-

Add guardrails: moderation prompts, content filters, or safety rules that wrap every request.

+

Add guardrails: access rates, grant or deny non-localhost access. Activate the front page link for chat to complete this quest.

-
- Shield definition -
-
- Open shield settings
- Store your shield directives (system prompts, stop words) as properties, then exercise them in chat. -
+
+ Shield definition +
+
+ Open shield settings
+ Store your shield directives (system prompts, stop words) as properties, then exercise them in chat.
+ + + #%env/templates/footer.template%# + + diff --git a/htroot/ConfigSearchPage_p.html b/htroot/ConfigSearchPage_p.html index 381006e24..a8e69849c 100644 --- a/htroot/ConfigSearchPage_p.html +++ b/htroot/ConfigSearchPage_p.html @@ -186,7 +186,7 @@
- +
diff --git a/htroot/Status.html b/htroot/Status.html index e2933c49f..3a7d16e4f 100644 --- a/htroot/Status.html +++ b/htroot/Status.html @@ -224,6 +224,8 @@ + + #%env/templates/footer.template%# diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template index b42d9a2c2..360e94e52 100644 --- a/htroot/env/templates/header.template +++ b/htroot/env/templates/header.template @@ -106,7 +106,7 @@
  •  
  • - @@ -149,13 +149,24 @@
  • Please help! We need financial help to move on with the development!
  • + #(navigation-showChatLink)#::
  •  
  • -
  • +
  • + + + +
  • + #(/navigation-showChatLink)# +
  •  
  • +
    diff --git a/htroot/yacychat.html b/htroot/yacychat.html index 26ee71cd1..ff68f18cf 100644 --- a/htroot/yacychat.html +++ b/htroot/yacychat.html @@ -542,8 +542,14 @@ - #%env/templates/header.template%# - #%env/templates/submenuAI.template%# + #(topmenu)# + #%env/templates/embeddedheader.template%# + :: + #%env/templates/simpleheader.template%# + :: + #%env/templates/header.template%# + #%env/templates/submenuAI.template%# + #(/topmenu)#

    YaCy Chat

    Chat with your configured LLM using the local YaCy settings. Requests are sent to the same host that served this page.

    @@ -1103,6 +1109,9 @@ body: JSON.stringify(payload) }); if (!response.ok) { + if (response.status === 429) { + throw new Error('Rate limit reached: please wait and try again. The server is protecting itself from overload.'); + } throw new Error(`Request failed: ${response.status} ${response.statusText}`); } if (!response.body) { -- cgit v1.2.3