mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 13:20:17 +00:00
Merge branch 'master' into features/advanced-reasoning
This commit is contained in:
29
README.md
29
README.md
@@ -3,14 +3,14 @@
|
||||
<div align="center">
|
||||
|
||||
[](https://github.com/khoj-ai/khoj/actions/workflows/test.yml)
|
||||
[](https://github.com/khoj-ai/khoj/pkgs/container/khoj)
|
||||
[](https://github.com/khoj-ai/khoj/pkgs/container/khoj)
|
||||
[](https://pypi.org/project/khoj/)
|
||||

|
||||
[](https://discord.gg/BDgyabRM6e)
|
||||
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<b>The open-source, personal AI for your digital brain</b>
|
||||
<b>Your AI second brain</b>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
@@ -19,11 +19,13 @@
|
||||
|
||||
[📑 Docs](https://docs.khoj.dev)
|
||||
<span> • </span>
|
||||
[🏮 App](https://khoj.dev)
|
||||
[🌐 Web](https://khoj.dev)
|
||||
<span> • </span>
|
||||
[🔥 App](https://app.khoj.dev)
|
||||
<span> • </span>
|
||||
[💬 Discord](https://discord.gg/BDgyabRM6e)
|
||||
<span> • </span>
|
||||
[📚 Blog](https://blog.khoj.dev)
|
||||
[✍🏽 Blog](https://blog.khoj.dev)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -31,14 +33,17 @@
|
||||
|
||||
***
|
||||
|
||||
[Khoj](https://khoj.dev) is a personal, open-source AI application for you to extend your capabilities.
|
||||
- Share your documents to extend your digital brain.
|
||||
- Access the internet, getting fresh information.
|
||||
- You can share pdf, markdown, org-mode, notion files and github repositories.
|
||||
- Fast, accurate semantic search on top of your docs.
|
||||
- Create images, talk out loud, play your messages.
|
||||
- Available Desktop, Emacs, Obsidian, Web and Whatsapp.
|
||||
[Khoj](https://khoj.dev) is a personal AI app to extend your capabilities. It smoothly scales up from an on-device personal AI to a cloud-scale enterprise AI.
|
||||
|
||||
- Chat with any local or online LLM (e.g llama3, qwen, gemma, mistral, gpt, claude, gemini).
|
||||
- Get answers from the internet and your docs (including image, pdf, markdown, org-mode, word, notion files).
|
||||
- Access it from your Browser, Obsidian, Emacs, Desktop, Phone or Whatsapp.
|
||||
- Build agents with custom knowledge bases and tools.
|
||||
- Create automations to get personal newsletters and smart notifications.
|
||||
- Find relevant docs quickly and easily using our advanced semantic search.
|
||||
- Generate images, talk out loud, play your messages.
|
||||
- Khoj is open-source, self-hostable. Always.
|
||||
- Run it privately on [your computer](https://docs.khoj.dev/get-started/setup) or try it on our [cloud app](https://app.khoj.dev).
|
||||
|
||||
***
|
||||
|
||||
|
||||
@@ -937,21 +937,21 @@ class ConversationAdapters:
|
||||
def get_conversation_config(user: KhojUser):
|
||||
subscribed = is_user_subscribed(user)
|
||||
if not subscribed:
|
||||
return ConversationAdapters.get_default_conversation_config()
|
||||
return ConversationAdapters.get_default_conversation_config(user)
|
||||
config = UserConversationConfig.objects.filter(user=user).first()
|
||||
if config:
|
||||
return config.setting
|
||||
return ConversationAdapters.get_advanced_conversation_config()
|
||||
return ConversationAdapters.get_advanced_conversation_config(user)
|
||||
|
||||
@staticmethod
|
||||
async def aget_conversation_config(user: KhojUser):
|
||||
subscribed = await ais_user_subscribed(user)
|
||||
if not subscribed:
|
||||
return await ConversationAdapters.aget_default_conversation_config()
|
||||
return await ConversationAdapters.aget_default_conversation_config(user)
|
||||
config = await UserConversationConfig.objects.filter(user=user).prefetch_related("setting").afirst()
|
||||
if config:
|
||||
return config.setting
|
||||
return ConversationAdapters.aget_advanced_conversation_config()
|
||||
return ConversationAdapters.aget_advanced_conversation_config(user)
|
||||
|
||||
@staticmethod
|
||||
async def aget_voice_model_config(user: KhojUser) -> Optional[VoiceModelOption]:
|
||||
@@ -1012,22 +1012,22 @@ class ConversationAdapters:
|
||||
return await ChatModelOptions.objects.filter().prefetch_related("openai_config").afirst()
|
||||
|
||||
@staticmethod
|
||||
def get_advanced_conversation_config():
|
||||
def get_advanced_conversation_config(user: KhojUser):
|
||||
server_chat_settings = ServerChatSettings.objects.first()
|
||||
if server_chat_settings is not None and server_chat_settings.chat_advanced is not None:
|
||||
return server_chat_settings.chat_advanced
|
||||
return ConversationAdapters.get_default_conversation_config()
|
||||
return ConversationAdapters.get_default_conversation_config(user)
|
||||
|
||||
@staticmethod
|
||||
async def aget_advanced_conversation_config():
|
||||
async def aget_advanced_conversation_config(user: KhojUser = None):
|
||||
server_chat_settings: ServerChatSettings = (
|
||||
await ServerChatSettings.objects.filter()
|
||||
.prefetch_related("chat_advanced", "chat_advanced__openai_config")
|
||||
.afirst()
|
||||
)
|
||||
if server_chat_settings is not None or server_chat_settings.chat_advanced is not None:
|
||||
if server_chat_settings is not None and server_chat_settings.chat_advanced is not None:
|
||||
return server_chat_settings.chat_advanced
|
||||
return await ConversationAdapters.aget_default_conversation_config()
|
||||
return await ConversationAdapters.aget_default_conversation_config(user)
|
||||
|
||||
@staticmethod
|
||||
def create_conversation_from_public_conversation(
|
||||
|
||||
Reference in New Issue
Block a user