Commit Graph

4330 Commits

Author SHA1 Message Date
sabaimran
9fc825d7a6 Release Khoj version 1.35.1 2025-01-22 19:51:28 -08:00
sabaimran
5a3a897080 Temporarily move logic to associate entry and fileobject objects into the management command, out of automatic migrations 2025-01-22 19:50:22 -08:00
sabaimran
fd90842d38 Bump postgresql server dev version to 16 for latest ubuntu 2025-01-22 19:07:54 -08:00
sabaimran
1a0923538e Release Khoj version 1.35.0 2025-01-22 19:03:25 -08:00
sabaimran
f96e5cd047 Allow file filter dropdown to pop up automatically when typing "file:" 2025-01-21 08:30:40 -08:00
sabaimran
6d1b16901d Fix the naming of framework > file 2025-01-21 07:24:43 -08:00
Debanjum
7fad1f43f6 Fix text quoting and format web app search page with prettier 2025-01-21 18:18:44 +07:00
sabaimran
8022f040d2 Fix spacing of pagination buttons 2025-01-20 17:23:14 -08:00
sabaimran
3b381a5fe8 Improve default state when no documents are found yet 2025-01-20 17:19:15 -08:00
sabaimran
e0dcd11f34 Allow browsing and discovery of knowlege base in the search page #1073
Currently, it's rather opaque and difficult to substantially browse through the uploaded knowledge base. Effectively, you can only do this through the small file modal in the settings page. 

Update to include all indexed files in the search page for viewing & deletion. Function to delete all files is still in the settings page.

Add a migration that associates file objects with `entry`s using a foreign key. Add a migration command that deletes dangling fileobjects.
2025-01-20 16:14:25 -08:00
sabaimran
4b35bee365 Merge branch 'master' of github.com:khoj-ai/khoj into HEAD 2025-01-20 15:35:19 -08:00
sabaimran
8ad60f53d3 Remove export from filefiltercombo box 2025-01-20 15:26:32 -08:00
sabaimran
9f18d6494f Add a file filter combobox for easier file filter selection 2025-01-20 14:39:29 -08:00
sabaimran
d36f235da5 Rename API to get all files, minor UI updates 2025-01-20 13:30:10 -08:00
sabaimran
849b7c7af6 Refresh current page after file deleted 2025-01-20 13:12:37 -08:00
sabaimran
edfed2d571 Merge branch 'master' of github.com:khoj-ai/khoj into features/add-a-knowledge-base-page 2025-01-20 13:11:45 -08:00
sabaimran
b661d2cba7 Merge pull request #1030 from Yash-1511/feat/autocomplete-file-query
## Description
Added file path autocompletion to enhance the search experience in Khoj. Users can now easily search for specific files by typing "file:" followed by the file name, with real-time suggestions appearing as they type.

## Changes
- Added new API endpoint `/api/file-suggestions` to get file path suggestions
- Enhanced search UI with dropdown suggestions for file paths
- Implemented debounced search to optimize API calls
- Added keyboard (Enter) and mouse click support for selecting suggestions

## Features
- Type "file:" to trigger file path suggestions
- Real-time filtering of suggestions as you type
- Top 10 alphabetically sorted suggestions
- Case-insensitive matching
- Keyboard and mouse interaction support
- Clear visual feedback with a dropdown UI
2025-01-20 12:35:43 -08:00
sabaimran
696551b686 Add typing to operations in merge migration file 2025-01-20 08:36:40 -08:00
sabaimran
d1e7b5b234 Add a merge migration to resolve differences 2025-01-20 08:34:57 -08:00
sabaimran
1f59afe962 Merge branch 'master' of github.com:khoj-ai/khoj into features/add-a-knowledge-base-page 2025-01-20 08:32:17 -08:00
sabaimran
016bcd7674 Revert page size to 10, rather than 1 2025-01-20 08:32:02 -08:00
sabaimran
8fe08eecce add --break-system-packages to bypass venv requirement 2025-01-20 00:21:27 -08:00
sabaimran
bf58d9430b downgrade postgres server pkg to 16 2025-01-20 00:15:56 -08:00
sabaimran
95ad1f936e upgrade postgres server to 17 2025-01-20 00:10:20 -08:00
sabaimran
a214bd4100 upgrade pg server dev version to 15 2025-01-20 00:05:35 -08:00
sabaimran
82ff74cfa9 Run on container with ubuntu latest for pytest gh action workflow 2025-01-19 23:57:57 -08:00
sabaimran
83d856f97d Add some basic pagination logic to the knowledge page to prevent overloading the Api or the client 2025-01-19 22:48:36 -08:00
Debanjum
fde71ded16 Upgrade web app dependencies 2025-01-19 13:44:59 +07:00
Debanjum
2d4633d298 Use encoded email, otp in login URL in email & web app sign-in flow
Previously emails with url special characters would not get
successfully identified for login. Account creation was fine due to
email being in POST request body. But login with such emails did not
work due to query params not being escaped before being sent to server

This change escapes both the code and email in login URL sent to
server. So login with emails containing special characters like
`email+khoj@gmail.com' works. It fixes both the URL web app sent by
web app directly and the magic link sent to users to their email

This change also fixes accessibility issue of having a DialogTitle in
DialogContent for screen readers.

Resolves #1090
2025-01-19 13:11:23 +07:00
Debanjum
51f3af11b5 Fix Qwen 2.5 14B model source to use Q4_K_M quantized model
The official Qwen2.5 14B model doesn't mention standard quantization
suffixes like Q4_K_M, so doesn't work with Khoj
2025-01-19 12:27:35 +07:00
sabaimran
af9e906cb5 Use python3 instead of python when running pip install commands in gh actions 2025-01-17 17:48:42 -08:00
sabaimran
b8c866014d Improve instruction description for the agent command description for notes 2025-01-17 17:19:59 -08:00
Tuğhan Belbek
849348e638 Handle additional HTTP redirect status code 308 in scheduled chat requests (#1088)
Closes #1067
2025-01-16 07:03:43 -08:00
Debanjum
00843f4f24 Release Khoj version 1.34.0 2025-01-16 12:11:28 +07:00
Debanjum
ad27f34c96 Support online search using Google Search API (#1087)
Add official Google Search API as an online search provider.
We currently support Serper.dev and Searxng as online search providers.
2025-01-16 11:41:59 +07:00
Debanjum
a649b03658 Support online search using Google Search API 2025-01-16 11:39:03 +07:00
Sam Ho
f8f159efac feat: add turnId handling to chat messages and history 2025-01-16 00:44:16 +00:00
sabaimran
42d4d15346 Merge pull request #1054 from khoj-ai/features/add-support-for-mermaidjs
We've been having issues generating diagrams with Excalidraw that are any degree of complexity. By contrast, LLMs are able to handle Mermaid.js syntax a lot better, as it's much more forgiving and has a simpler declarative style. Refer to https://mermaid.js.org/.

Update so that new diagrams are generated with Mermaid.js, while old diagrams generated with Excalidraw can still be viewed.
2025-01-15 11:55:12 -08:00
Debanjum
e2b2b3415e Fix handling of inline base64 images by Obsidian, Desktop clients
Fix for #1082 pushed down adding the `data:image/webp;base64' prefix
of the base64 images to the server image gen API. But the code on the
Obsidian and Desktop client still add these prefixes.

This change stops the Desktop, Obsidian clients from adding the prefix
as it is being handled by the API now. It should resolve showing
images inline in those clients as well
2025-01-15 23:34:23 +07:00
Debanjum
2e585efd2f Fix end with newline styling issue in style.css to pass lint checks 2025-01-15 19:43:02 +07:00
Debanjum
ed18c04576 Fix wrapping base64 generated image for inline display
Resolves #1082
2025-01-15 19:19:31 +07:00
Debanjum
f8b887cabd Allow using OpenAI (compatible) API for Speech to Text transcription 2025-01-15 19:19:31 +07:00
Debanjum
182c49b41c Prefer explicitly configured OpenAI API url, key for image gen model
Previously we'd use the general openai client, even if the image
generation model has a different api key and base url set.

This change uses the openai config of the image generation models when
set. Otherwise it fallbacks to use the first openai api provider set
2025-01-15 19:19:31 +07:00
Debanjum
24204873c8 Use same openai base url env var name as the official openai client
This eases re-use of the OpenAI API across all openai clients,
including chat, image generation, speech to text.

Resolves #1085
2025-01-15 19:19:30 +07:00
Debanjum
63dd3985b5 Support using Embeddings Model exposed via OpenAI (compatible) API (#1051)
This change adds the ability to use OpenAI, Azure OpenAI or any embedding model exposed behind an OpenAI compatible API (like Ollama, LiteLLM, vLLM etc.).

Khoj previously only supported HuggingFace embedding models running locally on device or via HuggingFaceW inference API endpoint. This allows using commercial embedding models to index your content with Khoj.
2025-01-15 17:39:54 +07:00
Debanjum
a6bf6803b6 Add docs on how to add, edit search model configs when self-hosting 2025-01-15 17:30:18 +07:00
Debanjum
92a1ec7afc Do not auto restart khoj docker services by default
Let folks who want to add that, add it manually if they want to. It
creates too much noise for folks having trouble with self-host setup
2025-01-15 13:09:50 +07:00
Debanjum
85c537a1de Set default PORT arg in Dockerfile to default Khoj port, 42110 2025-01-15 13:09:50 +07:00
Debanjum
9355381fac Catch error in call to data sources, output format selection tool AI
Previously if the call to this tool AI failed, the API call would
non-gracefully fail on server. This would leave the client hanging in
a wierd state (e.g with spinner running on web app with no indication
of issue).

Also do not show filters in query debug log lines when no filters in query
2025-01-15 13:09:50 +07:00
Debanjum
24ab8450ba Handle scenario where read chat stream error is not json on web app 2025-01-15 13:09:50 +07:00