diff --git a/README.md b/README.md index 81b6fde0..76feba33 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@
[![test](https://github.com/khoj-ai/khoj/actions/workflows/test.yml/badge.svg)](https://github.com/khoj-ai/khoj/actions/workflows/test.yml) -[![dockerize](https://github.com/khoj-ai/khoj/actions/workflows/dockerize.yml/badge.svg)](https://github.com/khoj-ai/khoj/pkgs/container/khoj) +[![docker](https://github.com/khoj-ai/khoj/actions/workflows/dockerize.yml/badge.svg)](https://github.com/khoj-ai/khoj/pkgs/container/khoj) [![pypi](https://github.com/khoj-ai/khoj/actions/workflows/pypi.yml/badge.svg)](https://pypi.org/project/khoj/) -![Discord](https://img.shields.io/discord/1112065956647284756?style=plastic&label=discord) +[![discord](https://img.shields.io/discord/1112065956647284756?style=plastic&label=discord)](https://discord.gg/BDgyabRM6e)
-The open-source, personal AI for your digital brain +Your AI second brain

@@ -19,11 +19,13 @@ [📑 Docs](https://docs.khoj.dev)   •   -[🏮 App](https://khoj.dev) +[🌐 Web](https://khoj.dev) +  •   +[🔥 App](https://app.khoj.dev)   •   [💬 Discord](https://discord.gg/BDgyabRM6e)   •   -[📚 Blog](https://blog.khoj.dev) +[✍🏽 Blog](https://blog.khoj.dev) @@ -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). *** diff --git a/src/khoj/database/adapters/__init__.py b/src/khoj/database/adapters/__init__.py index c67fa91a..833c2369 100644 --- a/src/khoj/database/adapters/__init__.py +++ b/src/khoj/database/adapters/__init__.py @@ -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(