From a1df602182282c037fc594902f708c77047adeb3 Mon Sep 17 00:00:00 2001 From: Petr Mironychev <9195189+Palm1r@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:29:27 +0200 Subject: [PATCH 1/3] Add troubleshooing chapter --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 5c80c62..3fc8142 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,23 @@ ollama run starcoder2:7b You're all set! QodeAssist is now ready to use in Qt Creator. ## Hotkeys + +- To call manual request to suggestion, you can use or change it in settings + - on Mac: Option + Command + Q + - on Windows: Ctrl + Alt + Q - To insert the full suggestion, you can use the TAB key - To insert line by line, you can use the "Move cursor word right" shortcut: - On Mac: Option + Right Arrow - On Windows: Alt + Right Arrow + +## Troubleshooting + +If you're experiencing issues with QodeAssist, you can try resetting the settings to their default values: +1. Open Qt Creator settings +2. Navigate to the "Qode Assist" tab +3. Click on the "Reset to Defaults" button + - The API key will not reset + - Select model after reset ## Support the development of QodeAssist If you find QodeAssist helpful, there are several ways you can support the project: From 73702584853ff8c1a6de7675d307ddcbc08cef07 Mon Sep 17 00:00:00 2001 From: Petr Mironychev <9195189+Palm1r@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:30:03 +0200 Subject: [PATCH 2/3] Fix default settings --- DocumentContextReader.cpp | 2 +- QodeAssistSettings.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/DocumentContextReader.cpp b/DocumentContextReader.cpp index 997ae23..0aa42b5 100644 --- a/DocumentContextReader.cpp +++ b/DocumentContextReader.cpp @@ -138,7 +138,7 @@ QString DocumentContextReader::getSpecificInstructions() const { QString specificInstruction = settings().specificInstractions().arg( LanguageServerProtocol::TextDocumentItem::mimeTypeToLanguageId(m_textDocument->mimeType())); - return QString("Instructions: %1").arg(specificInstruction); + return QString("%1").arg(specificInstruction); } CopyrightInfo DocumentContextReader::findCopyright() diff --git a/QodeAssistSettings.cpp b/QodeAssistSettings.cpp index 4997af6..188441e 100644 --- a/QodeAssistSettings.cpp +++ b/QodeAssistSettings.cpp @@ -58,7 +58,7 @@ QodeAssistSettings::QodeAssistSettings() llmProviders.setSettingsKey(Constants::LLM_PROVIDERS); llmProviders.setDisplayName(Tr::tr("LLM Providers:")); llmProviders.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox); - llmProviders.setDefaultValue(1); + llmProviders.setDefaultValue(0); url.setSettingsKey(Constants::URL); url.setLabelText(Tr::tr("URL:")); @@ -88,7 +88,7 @@ QodeAssistSettings::QodeAssistSettings() fimPrompts.setDisplayName(Tr::tr("Fill-In-Middle Prompt")); fimPrompts.setSettingsKey(Constants::FIM_PROMPTS); - fimPrompts.setDefaultValue(1); + fimPrompts.setDefaultValue(0); fimPrompts.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox); readFullFile.setSettingsKey(Constants::READ_FULL_FILE); @@ -111,7 +111,7 @@ QodeAssistSettings::QodeAssistSettings() maxTokens.setSettingsKey(Constants::MAX_TOKENS); maxTokens.setLabelText(Tr::tr("Max Tokens")); maxTokens.setRange(-1, 10000); - maxTokens.setDefaultValue(250); + maxTokens.setDefaultValue(150); useTopP.setSettingsKey(Constants::USE_TOP_P); useTopP.setDefaultValue(false); @@ -363,6 +363,12 @@ void QodeAssistSettings::resetSettingsToDefaults() resetAspect(enableLogging); resetAspect(ollamaLivetime); resetAspect(specificInstractions); + resetAspect(multiLineCompletion); + resetAspect(useFilePathInContext); + resetAspect(useSpecificInstructions); + + fimPrompts.setStringValue("StarCoder2"); + llmProviders.setStringValue("Ollama"); updateProviderSettings(); apply(); From 4891cc4b1ebfb5b87e33442170d9d6eaf0325365 Mon Sep 17 00:00:00 2001 From: Petr Mironychev <9195189+Palm1r@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:37:34 +0200 Subject: [PATCH 3/3] Additional info for troubleshooting --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fc8142..4e9f316 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,25 @@ You're all set! QodeAssist is now ready to use in Qt Creator. ## Troubleshooting -If you're experiencing issues with QodeAssist, you can try resetting the settings to their default values: +If QodeAssist is having problems connecting to the LLM provider, please check the following: + +1. Verify the IP address and port: + + - For Ollama, the default is usually http://localhost:11434 + - For LM Studio, the default is usually http://localhost:1234 + +2. Check the endpoint: + +Make sure the endpoint in the settings matches the one required by your provider + - For Ollama, it should be /api/generate + - For LM Studio and OpenAI compatible providers, it's usually /v1/chat/completions + +3. Confirm that the selected model and template are compatible: + +Ensure you've chosen the correct model in the "Select Models" option +Verify that the selected prompt template matches the model you're using + +If you're still experiencing issues with QodeAssist, you can try resetting the settings to their default values: 1. Open Qt Creator settings 2. Navigate to the "Qode Assist" tab 3. Click on the "Reset to Defaults" button