Commit Graph

61 Commits

Author SHA1 Message Date
dane madsen
40b886e5d7 Use provider to toggle theme 2023-11-26 20:03:38 +10:00
dane madsen
7a3bd6c904 Work on themes 2023-11-26 19:52:15 +10:00
dane madsen
f394f8f066 Basic desktop UI 2023-11-19 18:35:02 +10:00
dane madsen
f031059b8f automatically switch desktop / mobile mode 2023-11-19 14:26:09 +10:00
dane madsen
1bed746880 Navigation rail 2023-11-19 13:29:12 +10:00
dane madsen
0fff689e79 begin work separating desktop from mobile 2023-11-18 21:36:13 +10:00
dane madsen
d2ffb0bfe1 remove global key 2023-11-17 22:32:51 +10:00
dane madsen
b1375675d6 Merge branch 'main' of https://github.com/danemadsen/Maid 2023-11-17 22:31:26 +10:00
dane madsen
67b2612757 remove global keys 2023-11-17 22:28:56 +10:00
Dane Madsen
0924674871 Move promptController and focusNode to Message Manager (#118) 2023-11-17 22:24:16 +10:00
dane madsen
2e014c6501 Move promptController and focusNode to Message Manager 2023-11-17 22:23:53 +10:00
dane madsen
18f653551a rename image 2023-11-15 20:38:20 +10:00
sfiannaca
87fac74baa moved at first line WidgetsFlutterBinding (#101)
* moved at first line WidgetsFlutterBinding

* adjusting n_threads slider based on nCores
2023-11-13 20:12:29 +10:00
dane madsen
340c256ddb Fix chat persistance 2023-11-13 17:29:55 +10:00
dane madsen
ddc35eee45 basic chat persistance 2023-11-13 16:23:54 +10:00
dane madsen
48ac2eb60b Work on shared prefs 2023-11-13 12:28:24 +10:00
dane madsen
7171f6621e refactor 2023-11-13 09:53:21 +10:00
sfiannaca
e5f1e65bc9 override status bar 2023-11-12 20:33:42 +01:00
sfiannaca
550362e9e2 Permission to extend on the local network 0.0.0.0 (#87)
* Refactor slider for better mobile use

* ensureInitialized

* permission for local network 0.0.0.0

* check if no model is saved

* move GenerationManager out setstate
2023-11-12 10:45:59 +10:00
dane madsen
c97e152d10 Make MemoryManager static 2023-11-09 19:05:27 +10:00
sfiannaca
8923661995 Potential fix cache-model (#62)
* cache fix with another libs

* deprecated

* check localContext

* linux rootDirectory
2023-11-06 09:27:25 +10:00
dane madsen
821e2d95e2 Refactor 2023-11-05 13:57:32 +10:00
dane madsen
e64f9a7e11 use callback instead of global key 2023-11-03 22:27:29 +10:00
dane madsen
7ac280012a Work on chat managemnet logic 2023-11-03 19:51:15 +10:00
dane madsen
92c802983a Fix warnings and add settings class 2023-10-30 14:33:41 +10:00
dane madsen
a11c65b10c Separate model settings and character settings 2023-10-29 19:55:53 +10:00
dane madsen
9a2e785b76 Respect users theme preference on startup 2023-10-29 12:53:36 +10:00
dane madsen
691cf1656f work Light theme 2023-10-27 15:29:19 +10:00
dane madsen
45dd159cf1 simplify code 2023-10-12 09:45:04 +10:00
dane madsen
9bfaf94096 Improved looks 2023-10-12 09:27:05 +10:00
dane madsen
cbf62f80f9 move code around 2023-10-12 08:19:05 +10:00
dane madsen
1e86b308ca remove unecisary class 2023-10-11 10:32:54 +10:00
dane madsen
cbdcd6f9ed moved chat code to its own widget 2023-10-10 21:18:20 +10:00
dane madsen
583256d1b6 fix chat UI and remove example 2023-10-10 15:23:58 +10:00
dane madsen
6b622b5f73 further simplify 2023-10-10 12:18:38 +10:00
dane madsen
85512b2ece create settings widget 2023-10-05 12:03:54 +10:00
dane madsen
c4358cb06e rename project 2023-10-05 11:22:08 +10:00
dane madsen
6b435af784 refactor 2023-10-05 10:52:12 +10:00
dane madsen
62af681037 simplify loading 2023-10-04 23:40:23 +10:00
dane madsen
b65eb7d64c begin settings dialog 2023-10-04 23:12:34 +10:00
dane madsen
006183713d initial 2023-10-04 22:51:21 +10:00
Daniel Drake
06c75c3fe5 Pass initial message separately from prompt
The llama.cpp logic is built around the prompt ending with the
reverse-prompt and the actual user input being passed separately.

Adjust Sherpa to do the same, rather than appending the first line of
user input to the prompt.
2023-07-03 08:14:33 +02:00
Daniel Drake
ec3dd48a08 Fix initialization of default prompt
On first run on my Android device, the pre-prompt is empty, it does
not get initialized to any value.

This is because SharedPreferences performs asynchronous disk I/O,
and initDefaultPrompts() uses a different SharedPreferences instance from
getPrePrompts(). There's no guarantee that a preferences update on one
instance will become immediately available in another.

Tweak the logic to not depend on synchronization between two
SharedPreferences instances.
2023-07-03 07:41:55 +02:00
Daniel Drake
e4834993f6 Update llama.cpp and move core processing to native code
Update llama.cpp to the latest version as part of an effort to make this
app usable on my Samsung Galaxy S10 smartphone.

The newer llama.cpp includes a double-close fix which was causing the app
to immediately crash upon starting the AI conversation (llama.cpp commit
47f61aaa5f76d04).

It also adds support for 3B models, which are considerably smaller. The
llama-7B models were causing Android's low memory killer to terminate
Sherpa after just a few words of conversation, whereas new models such as
orca-mini-3b.ggmlv3.q4_0.bin work on this device without quickly exhausting
all available memory.

llama.cpp's model compatibility has changed within this update, so ggml
files that were working in the previous version are unlikely to work now;
they need converting. However the orca-mini offering is already in the
new format and works out of the box.

llama.cpp's API has changed in this update. Rather than rework the Dart
code, I opted to leave it in C++, using llama.cpp's example code as a base.
This solution is included in a new "llamasherpa" library which calls
into llama.cpp. Since lots of data is passed around in large arrays,
I expect running this in Dart had quite some overhead, and this native
approach should perform considerably faster.

This eliminates the need for Sherpa's Dart code to call llama.cpp directly,
so there's no need to separately maintain a modified version of llama.cpp
and we can use the official upstream.
2023-07-01 21:22:38 +02:00
Daniel Drake
772e6c2753 Adjust default prompts
Set the main default prompt to chat-with-bob from llama.cpp.
This seems to produce much more useful conversations with llama-7b and
orca-mini-3b models that I have tested.

Also make the reverse prompt consistently "User:" in both default prompt
options, and set the default reverse prompt detection to the same value.
2023-06-30 22:03:28 +02:00
Guerin Maxime
6243841a0d 2.2.1+8 2023-04-14 14:55:57 +02:00
Guerin Maxime
b6bbb71773 add stop button 2023-04-14 14:03:36 +02:00
Guerin Maxime
15f532d300 no stop button because dont work 2023-04-12 15:33:51 +02:00
Maxime GUERIN
3496c1bf0d modif to try on ios 2023-04-12 14:29:22 +02:00
Thibaut Léaux
ecaf2f4395 passing values only to isolate 2023-04-05 13:26:19 +02:00