Skip to content

Commit 7a8c25f

Browse files
committed
pbek/QOwnNotes#3052 ollama-integration: fix variable assignments
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent 9541dab commit 7a8c25f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ollama-integration/info.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Ollama AI backend integration",
33
"identifier": "ollama-integration",
44
"script": "ollama-integration.qml",
5-
"version": "0.1.2",
5+
"version": "0.1.3",
66
"minAppVersion": "24.6.3",
77
"authors": ["@pbek"],
88
"description" : "This script provides integration for a local <a href=\"https://github.com/ollama/ollama\">Ollama</a> AI backend. If the Ollama service is up, the installed models will be fetched automatically every time the scripting engine is reloaded."

ollama-integration/ollama-integration.qml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Script {
3030
];
3131

3232
function init() {
33-
const data = script.downloadUrlToString(this.apiBaseUrl + '/api/tags')
33+
const data = script.downloadUrlToString(apiBaseUrl + '/api/tags')
3434

3535
if (data === '') {
3636
return;
@@ -40,7 +40,7 @@ Script {
4040
const modelNames = dataJson.models.map(model => model.model);
4141

4242
if (modelNames.length > 0) {
43-
this.models = modelNames.join(',');
43+
models = modelNames.join(',');
4444
}
4545
}
4646

@@ -49,7 +49,7 @@ Script {
4949
* It returns a list of objects with config parameters for new OpenAI backends
5050
*/
5151
function openAiBackendsHook() {
52-
const baseUrl = this.apiBaseUrl + '/v1/chat/completions';
52+
const baseUrl = apiBaseUrl + '/v1/chat/completions';
5353

5454
return [
5555
{

0 commit comments

Comments
 (0)