Skip to content

Commit 029d92c

Browse files
authored
Hotfix web search bug (#259)
* added the missing condition to Web Search flag * Change log / Documentation Update
1 parent 9c2158e commit 029d92c

6 files changed

Lines changed: 33 additions & 6 deletions

File tree

_changelog/2.3.3.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# v2.3.3
2+
3+
### Bugfix
4+
5+
- Resolved a frontend issue that occurred when no models with web search capability were available.

_documentation/2-GettingStarted/1-Local Installation.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,20 @@ then navigate to `config/model_lists/ollama_models.php` and add your model attri
178178
179179
>Before hosting models, make sure your system has the minimum required resources.
180180
181+
>**IMPORTANT**
182+
>
183+
>Currently, HAWKI is configured to use Gemini models’ native web search tool. If you want to disable the Google provider, make sure to add the following environment variables to disable the default web search model:
184+
>```
185+
># Deactivte Google Models
186+
> GOOGLE_ACTIVE=false
187+
> # Disable Default Web Search Model
188+
> DEFAULT_WEBSEARCH_MODEL=""
189+
> ```
181190
182191
**Authentication**
183192
184193
in the .env file find AUTHENTICATION_METHOD variable.
185-
Currently, HAWKI supports LDAP, OpenID, and Shibboleth authentication services. A built-in Test User Athentication for internal testing purposes is also available.
194+
Currently, HAWKI supports LDAP, OpenID, and Shibboleth authentication services. A built-in Test User Authentication for internal testing purposes is also available.
186195
Since normally external authentication servers are not accessible from your local machine, **set the authentication method to LDAP** and enable "test user login" in order to use test users files.
187196
188197
```

_documentation/5-Deployment/1-Apache Server.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,21 @@ then navigate to `config/model_lists/ollama_models.php` and add your model varia
217217
218218
>Before hosting models, make sure your system has the minimum required resources.
219219
220-
220+
>**IMPORTANT**
221+
>
222+
>Currently, HAWKI is configured to use Gemini models’ native web search tool. If you want to disable the Google provider, make sure to add the following environment variables to disable the default web search model:
223+
>```
224+
># Deactivte Google Models
225+
> GOOGLE_ACTIVE=false
226+
> # Disable Default Web Search Model
227+
> DEFAULT_WEBSEARCH_MODEL=""
228+
> ```
221229
222230
**Authentication**
223231
224232
225233
in the .env file find AUTHENTICATION_METHOD variable.
226-
Currently HAWKI supports LDAP, OpenID, and Shibboleth authentication services. A built-in Test User Athentication for internal testing purposes is also available.
234+
Currently, HAWKI supports LDAP, OpenID, and Shibboleth authentication services. A built-in Test User Authentication for internal testing purposes is also available.
227235
228236
Set the variable to one of the following:
229237

public/js/ai_chat_functions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ async function sendMessageConv(inputField) {
121121
messageElement.dataset.rawMsg = submissionData.content.text;
122122
scrollToLast(true, messageElement);
123123

124-
const webSearchActive = inputField.closest('.input-container').querySelector('#websearch-btn').classList.contains('active');
124+
const webSearchBtn = inputField.closest('.input-container').querySelector('#websearch-btn') ?? null;
125+
const webSearchActive = webSearchBtn ? webSearchBtn.classList.contains('active') : false;
126+
125127
const tools = {
126128
'web_search': webSearchActive
127129
}

public/js/groupchat_functions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ async function onSendMessageToRoom(inputField) {
114114
const aiKeyRaw = await exportSymmetricKey(aiKey);
115115
const aiKeyBase64 = arrayBufferToBase64(aiKeyRaw);
116116

117-
const webSearchActive = inputField.closest('.input-container').querySelector('#websearch-btn').classList.contains('active');
117+
const webSearchBtn = inputField.closest('.input-container').querySelector('#websearch-btn') ?? null;
118+
const webSearchActive = webSearchBtn ? webSearchBtn.classList.contains('active') : false;
119+
118120
const tools = {
119121
'web_search': webSearchActive
120122
}

public/js/message_functions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,8 @@ async function regenerateMessage(messageElement, Done = null){
761761
else{
762762
inputContainer = messageElement.closest('.thread').querySelector('.input-container');
763763
}
764-
const webSearchActive = inputContainer.querySelector('#websearch-btn').classList.contains('active');
764+
const webSearchBtn = inputContainer.querySelector('#websearch-btn') ?? null;
765+
const webSearchActive = webSearchBtn ? webSearchBtn.classList.contains('active') : false;
765766

766767
const tools = {
767768
'web_search': webSearchActive

0 commit comments

Comments
 (0)