mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-06-04 01:28:58 -04:00
Merge pull request #7 from Palm1r/version-0.0.9
Version 0.0.9 - Fix default settings
This commit is contained in:
commit
16035d6de6
@ -138,7 +138,7 @@ QString DocumentContextReader::getSpecificInstructions() const
|
|||||||
{
|
{
|
||||||
QString specificInstruction = settings().specificInstractions().arg(
|
QString specificInstruction = settings().specificInstractions().arg(
|
||||||
LanguageServerProtocol::TextDocumentItem::mimeTypeToLanguageId(m_textDocument->mimeType()));
|
LanguageServerProtocol::TextDocumentItem::mimeTypeToLanguageId(m_textDocument->mimeType()));
|
||||||
return QString("Instructions: %1").arg(specificInstruction);
|
return QString("%1").arg(specificInstruction);
|
||||||
}
|
}
|
||||||
|
|
||||||
CopyrightInfo DocumentContextReader::findCopyright()
|
CopyrightInfo DocumentContextReader::findCopyright()
|
||||||
|
@ -58,7 +58,7 @@ QodeAssistSettings::QodeAssistSettings()
|
|||||||
llmProviders.setSettingsKey(Constants::LLM_PROVIDERS);
|
llmProviders.setSettingsKey(Constants::LLM_PROVIDERS);
|
||||||
llmProviders.setDisplayName(Tr::tr("LLM Providers:"));
|
llmProviders.setDisplayName(Tr::tr("LLM Providers:"));
|
||||||
llmProviders.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
|
llmProviders.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
|
||||||
llmProviders.setDefaultValue(1);
|
llmProviders.setDefaultValue(0);
|
||||||
|
|
||||||
url.setSettingsKey(Constants::URL);
|
url.setSettingsKey(Constants::URL);
|
||||||
url.setLabelText(Tr::tr("URL:"));
|
url.setLabelText(Tr::tr("URL:"));
|
||||||
@ -88,7 +88,7 @@ QodeAssistSettings::QodeAssistSettings()
|
|||||||
|
|
||||||
fimPrompts.setDisplayName(Tr::tr("Fill-In-Middle Prompt"));
|
fimPrompts.setDisplayName(Tr::tr("Fill-In-Middle Prompt"));
|
||||||
fimPrompts.setSettingsKey(Constants::FIM_PROMPTS);
|
fimPrompts.setSettingsKey(Constants::FIM_PROMPTS);
|
||||||
fimPrompts.setDefaultValue(1);
|
fimPrompts.setDefaultValue(0);
|
||||||
fimPrompts.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
|
fimPrompts.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
|
||||||
|
|
||||||
readFullFile.setSettingsKey(Constants::READ_FULL_FILE);
|
readFullFile.setSettingsKey(Constants::READ_FULL_FILE);
|
||||||
@ -111,7 +111,7 @@ QodeAssistSettings::QodeAssistSettings()
|
|||||||
maxTokens.setSettingsKey(Constants::MAX_TOKENS);
|
maxTokens.setSettingsKey(Constants::MAX_TOKENS);
|
||||||
maxTokens.setLabelText(Tr::tr("Max Tokens"));
|
maxTokens.setLabelText(Tr::tr("Max Tokens"));
|
||||||
maxTokens.setRange(-1, 10000);
|
maxTokens.setRange(-1, 10000);
|
||||||
maxTokens.setDefaultValue(250);
|
maxTokens.setDefaultValue(150);
|
||||||
|
|
||||||
useTopP.setSettingsKey(Constants::USE_TOP_P);
|
useTopP.setSettingsKey(Constants::USE_TOP_P);
|
||||||
useTopP.setDefaultValue(false);
|
useTopP.setDefaultValue(false);
|
||||||
@ -363,6 +363,12 @@ void QodeAssistSettings::resetSettingsToDefaults()
|
|||||||
resetAspect(enableLogging);
|
resetAspect(enableLogging);
|
||||||
resetAspect(ollamaLivetime);
|
resetAspect(ollamaLivetime);
|
||||||
resetAspect(specificInstractions);
|
resetAspect(specificInstractions);
|
||||||
|
resetAspect(multiLineCompletion);
|
||||||
|
resetAspect(useFilePathInContext);
|
||||||
|
resetAspect(useSpecificInstructions);
|
||||||
|
|
||||||
|
fimPrompts.setStringValue("StarCoder2");
|
||||||
|
llmProviders.setStringValue("Ollama");
|
||||||
|
|
||||||
updateProviderSettings();
|
updateProviderSettings();
|
||||||
apply();
|
apply();
|
||||||
|
31
README.md
31
README.md
@ -59,10 +59,41 @@ ollama run starcoder2:7b
|
|||||||
You're all set! QodeAssist is now ready to use in Qt Creator.
|
You're all set! QodeAssist is now ready to use in Qt Creator.
|
||||||
|
|
||||||
## Hotkeys
|
## 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 the full suggestion, you can use the TAB key
|
||||||
- To insert line by line, you can use the "Move cursor word right" shortcut:
|
- To insert line by line, you can use the "Move cursor word right" shortcut:
|
||||||
- On Mac: Option + Right Arrow
|
- On Mac: Option + Right Arrow
|
||||||
- On Windows: Alt + 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
|
## Support the development of QodeAssist
|
||||||
If you find QodeAssist helpful, there are several ways you can support the project:
|
If you find QodeAssist helpful, there are several ways you can support the project:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user