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(); diff --git a/README.md b/README.md index 5c80c62..4e9f316 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,41 @@ 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 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 + - 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: