Skip to content

Commit

Permalink
ollama-integration: fix variable assignments
Browse files Browse the repository at this point in the history
Signed-off-by: Patrizio Bekerle <[email protected]>
  • Loading branch information
pbek committed Aug 1, 2024
1 parent 9541dab commit 11cceff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ollama-integration/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Ollama AI backend integration",
"identifier": "ollama-integration",
"script": "ollama-integration.qml",
"version": "0.1.2",
"version": "0.1.3",
"minAppVersion": "24.6.3",
"authors": ["@pbek"],
"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."
Expand Down
6 changes: 3 additions & 3 deletions ollama-integration/ollama-integration.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Script {
];

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

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

if (modelNames.length > 0) {
this.models = modelNames.join(',');
models = modelNames.join(',');
}
}

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

return [
{
Expand Down

0 comments on commit 11cceff

Please sign in to comment.