-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Enable Creating Content Plugins #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configure external text content plugins via the Khoj YAML Reuse existing TextContentConfig definition for external text content plugins
- Read, merge entries from input jsonl files and filters - Mark new, modified entries for update
021cbb6
to
368f475
Compare
The SearchType is now dynamically populated with core and configured plugin types Use the new dynamic SearchType enum from state.py across codebase
Configure app routes after configuring server. Import API routers after search type is dynamically populated. Allow API to recognize the dynamically populated plugin search types as valid type query param. Enable searching for plugin type content.
Simplifies dynamically populating enabled content types for interfaces
Render only the entry from plugin search response instead of raw json
…face Render only the entry from plugin search response instead of raw json Use the results-ledger styling for results-plugin styling
It may have been disabled due to issues with image search earlier
79aba96
to
ede6eb6
Compare
I'll fix (or disable) these workflows separately |
sabaimran
approved these changes
Mar 1, 2023
Looks great! Looking forward to migrating Panchayat to using the plugin format. |
- Remove need for interfaces to downcase content types returned by API before using the type in search and other API endpoint - Fix to check for search_type.name in plugin keys instead of value
- Previously was return all core content types even if they had not been setup - Add test to validate only configured content types are returned by the api/config/types API endpoint
debanjum
added a commit
that referenced
this pull request
Mar 1, 2023
…gured - Test /config/types API when no plugin configured, only plugin configured and no content configured scenarios - Do not throw null reference exception while configuring search types when no plugin configured - Do not throw null reference exception on calling /config/types API when no plugin configured Resolves bug introduced by #173
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
Index, Search text content not supported by default in Khoj using plugins
Usage
raw
,compiled
andfile
keys.raw
value is rendered as the search result in the interfacescompiled
values are used to generate embeddings for searchfile
key can be used to jump to the result in its source file from the interfaceskhoj.yml
to point to the location of the plugin generated jsonl via theinput-files
,input-filter
fields. Seetests/data/config.yml
. This is done on user machine either via code or by user manually updating theirkhoj.yml
file/api/update?t=<plugin-name>
API endpointCode Changes
khoj.yml
It will be extended to render more content plugins later
Testing
JsonlToJsonl
processor