mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Improve search model config display for admin (#887) from aam-at/feature/improve_search_model_config_admin
Currently, the search model config display for admins only shows the id of the search model config, which is not very informative. The changes enhances the admin console by displaying the name of the search model config (name), as well as the bi-encoder model (bi_encoder) and cross-encoder model (cross_encoder) along the id.
This commit is contained in:
commit
8dad9362e7
1 changed files with 11 additions and 1 deletions
|
@ -94,7 +94,6 @@ admin.site.register(KhojUser, KhojUserAdmin)
|
|||
|
||||
admin.site.register(ProcessLock)
|
||||
admin.site.register(SpeechToTextModelOptions)
|
||||
admin.site.register(SearchModelConfig)
|
||||
admin.site.register(ReflectiveQuestion)
|
||||
admin.site.register(UserSearchModelConfig)
|
||||
admin.site.register(ClientApplication)
|
||||
|
@ -178,6 +177,17 @@ class OpenAIProcessorConversationConfigAdmin(admin.ModelAdmin):
|
|||
search_fields = ("id", "name", "api_key", "api_base_url")
|
||||
|
||||
|
||||
@admin.register(SearchModelConfig)
|
||||
class SearchModelConfigAdmin(admin.ModelAdmin):
|
||||
list_display = (
|
||||
"id",
|
||||
"name",
|
||||
"bi_encoder",
|
||||
"cross_encoder",
|
||||
)
|
||||
search_fields = ("id", "name", "bi_encoder", "cross_encoder")
|
||||
|
||||
|
||||
@admin.register(ServerChatSettings)
|
||||
class ServerChatSettingsAdmin(admin.ModelAdmin):
|
||||
list_display = (
|
||||
|
|
Loading…
Reference in a new issue