Skip to content

Commit

Permalink
Fixed app crashing because of model tweaks
Browse files Browse the repository at this point in the history
Jeffser committed May 30, 2024
1 parent 93ba903 commit 725e093
Showing 5 changed files with 34 additions and 29 deletions.
25 changes: 0 additions & 25 deletions com.jeffser.Alpaca.json
Original file line number Diff line number Diff line change
@@ -71,31 +71,6 @@
}
]
},
{
"name": "ollama",
"buildsystem": "simple",
"build-commands": [
"install -Dm0755 ollama* ${FLATPAK_DEST}/bin/ollama"
],
"sources": [
{
"type": "file",
"url": "https://github.com/ollama/ollama/releases/download/v0.1.38/ollama-linux-amd64",
"sha256": "c3360812503a9756a507ebb9d78667e2b21800a760b45046bc48a8f3b81972f4",
"only-arches": [
"x86_64"
]
},
{
"type": "file",
"url": "https://github.com/ollama/ollama/releases/download/v0.1.38/ollama-linux-arm64",
"sha256": "f2d091afe665b2d5ba8b68e2473d36cdfaf80c61c7d2844a0a8f533c4e62f547",
"only-arches": [
"aarch64"
]
}
]
},
{
"name" : "alpaca",
"builddir" : true,
20 changes: 20 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -33,4 +33,24 @@ test('Validate schema file',
compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()])

service_conf = configuration_data()
service_conf.set('appid', application_id)
service_conf.set('libexecdir', join_paths(get_option('prefix'), get_option('bindir')))
configure_file(
input: 'com.jeffser.Alpaca.SearchProvider.service.in',
output: '@0@.SearchProvider.service'.format(application_id),
configuration: service_conf,
install_dir: join_paths(join_paths(get_option('prefix'), get_option('datadir')), 'dbus-1', 'services')
)

search_provider_conf = configuration_data()
search_provider_conf.set('appid', application_id)
configure_file(
configuration: search_provider_conf,
input: files('com.jeffser.Alpaca.SearchProvider.ini.in'),
install_dir: join_paths(get_option('datadir'), 'gnome-shell', 'search-providers'),
output: '@0@.SearchProvider.ini'.format(application_id)
)


subdir('icons')
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
project('Alpaca',
project('Alpaca', 'c',
version: '0.9.1',
meson_version: '>= 0.62.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)

i18n = import('i18n')
gnome = import('gnome')
application_id = 'com.jeffser.Alpaca'

subdir('data')
subdir('src')
9 changes: 9 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -26,6 +26,15 @@ configure_file(
install_mode: 'r-xr-xr-x'
)

configure_file(
input: 'alpaca_search_provider.in',
output: 'alpaca_search_provider',
configuration: conf,
install: true,
install_dir: get_option('bindir'),
install_mode: 'r-xr-xr-x'
)

alpaca_sources = [
'__init__.py',
'main.py',
6 changes: 3 additions & 3 deletions src/window.py
Original file line number Diff line number Diff line change
@@ -920,9 +920,9 @@ def __init__(self, **kwargs):
self.run_on_background = data['run_on_background']
#Model Tweaks
if "model_tweaks" in data: self.model_tweaks = data['model_tweaks']
self.temperature_spin.set_value(data['model_tweaks']['temperature'])
self.seed_spin.set_value(data['model_tweaks']['seed'])
self.keep_alive_spin.set_value(data['model_tweaks']['keep_alive'])
self.temperature_spin.set_value(self.model_tweaks['model_tweaks']['temperature'])
self.seed_spin.set_value(self.model_tweaks['model_tweaks']['seed'])
self.keep_alive_spin.set_value(self.model_tweaks['model_tweaks']['keep_alive'])

self.background_switch.set_active(self.run_on_background)
self.set_hide_on_close(self.run_on_background)

0 comments on commit 725e093

Please sign in to comment.