diff --git a/documentation/docs/get-started/setup.mdx b/documentation/docs/get-started/setup.mdx index 8d1493fb..ca4c8767 100644 --- a/documentation/docs/get-started/setup.mdx +++ b/documentation/docs/get-started/setup.mdx @@ -206,7 +206,7 @@ Using Ollama? See the [Ollama Integration](/advanced/ollama) section for more cu ::: 1. Go to the [OpenAI settings](http://localhost:42110/server/admin/database/openaiprocessorconversationconfig/) in the server admin settings to add an OpenAI processor conversation config. This is where you set your API key and server API base URL. The API base URL is optional - it's only relevant if you're using another OpenAI-compatible proxy server. -2. Go over to configure your [chat model options](http://localhost:42110/server/admin/database/chatmodeloptions/). Set the `chat-model` field to a supported chat model[^1] of your choice. For example, you can specify `gpt-4-turbo-preview` if you're using OpenAI. +2. Go over to configure your [chat model options](http://localhost:42110/server/admin/database/chatmodeloptions/). Set the `chat-model` field to a supported chat model[^1] of your choice. For example, you can specify `gpt-4o` if you're using OpenAI. - Make sure to set the `model-type` field to `OpenAI`. - The `tokenizer` and `max-prompt-size` fields are optional. Set them only if you're sure of the tokenizer or token limit for the model you're using. Contact us if you're unsure what to do here. diff --git a/src/khoj/processor/conversation/openai/gpt.py b/src/khoj/processor/conversation/openai/gpt.py index 171e9b3a..c6f744fa 100644 --- a/src/khoj/processor/conversation/openai/gpt.py +++ b/src/khoj/processor/conversation/openai/gpt.py @@ -23,7 +23,7 @@ logger = logging.getLogger(__name__) def extract_questions( text, - model: Optional[str] = "gpt-4-turbo-preview", + model: Optional[str] = "gpt-4o-mini", conversation_log={}, api_key=None, api_base_url=None, @@ -43,7 +43,7 @@ def extract_questions( [ f'Q: {chat["intent"]["query"]}\nKhoj: {{"queries": {chat["intent"].get("inferred-queries") or list([chat["intent"]["query"]])}}}\nA: {chat["message"]}\n\n' for chat in conversation_log.get("chat", [])[-4:] - if chat["by"] == "khoj" and "text-to-image" not in chat["intent"].get("type") + if chat["by"] == "khoj" and "to-image" not in chat["intent"].get("type") ] ) diff --git a/src/khoj/utils/constants.py b/src/khoj/utils/constants.py index 9b7ffb77..bbbbd000 100644 --- a/src/khoj/utils/constants.py +++ b/src/khoj/utils/constants.py @@ -9,7 +9,7 @@ app_env_filepath = "~/.khoj/env" telemetry_server = "https://khoj.beta.haletic.com/v1/telemetry" content_directory = "~/.khoj/content/" default_offline_chat_model = "bartowski/Meta-Llama-3.1-8B-Instruct-GGUF" -default_online_chat_model = "gpt-4-turbo-preview" +default_online_chat_model = "gpt-4o-mini" empty_config = { "search-type": {