mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 13:20:17 +00:00
Add option to use HuggingFace's inference endpoint for generating embeddings (#609)
* Support using hosted Huggingface inference endpoint for embeddings generation * Since the huggingface inference endpoint is model-specific, make the URL an optional property of the search model config * Handle ECONNREFUSED error in desktop app * Drive API key via the search model config model and use more generic names
This commit is contained in:
@@ -208,7 +208,10 @@ function pushDataToKhoj (regenerate = false) {
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
if (error.response.status == 429) {
|
||||
if (error.code == 'ECONNREFUSED') {
|
||||
const win = BrowserWindow.getAllWindows()[0];
|
||||
if (win) win.webContents.send('update-state', state);
|
||||
} else if (error.response.status == 429) {
|
||||
const win = BrowserWindow.getAllWindows()[0];
|
||||
if (win) win.webContents.send('needsSubscription', true);
|
||||
if (win) win.webContents.send('update-state', state);
|
||||
|
||||
Reference in New Issue
Block a user