Resumable intermediates #2

Merged
tangent merged 17 commits from resumable-intermediates into main 2026-08-23 23:59:39 -06:00
4 changed files with 10 additions and 4 deletions
Showing only changes of commit 83b26787fe - Show all commits
+2 -1
View File
@@ -31,7 +31,8 @@ output.)
```
The above are the default settings. If you need something different, you only
need to specify the changes.
need to specify the changes. (There is a `config.json.example` file equivalent
to the above.)
### Gemini Issues
None of this works unless you **disable Gemini's personalization/memory**,
+3 -1
View File
@@ -1,5 +1,7 @@
{
"llm_covers": {
"calibre_location": "/Applications/calibre.app"
"calibre_location": "/Applications/calibre.app",
"default_model": "gemma4:12b-mlx",
"maximum_bytes": 40000
}
}
+2
View File
@@ -18,6 +18,8 @@ function timing.stop()
end
function timing.print_report()
if #entries == 0 then return end
local minimum, maximum, sum = math.huge, -math.huge, 0
for _, data in pairs(entries) do
local delta = data.delta
+3 -2
View File
@@ -52,8 +52,8 @@ local send_prompt = function(text, model)
timing.start()
-- word wrap breaks the raw output badly, so I need to implement my own for terminal output somehow
local output = utility.capture_safe("cat " .. tmp_file_name:enquote() .. " | ollama run " .. (model or default_model) .. " --nowordwrap")
os.execute("ollama stop " .. (model or default_model)) -- NOTE this makes things slower, but more stable
local output = utility.capture_safe("cat " .. tmp_file_name:enquote() .. " | ollama run " .. (model or config.llm_covers.default_model) .. " --nowordwrap")
os.execute("ollama stop " .. (model or config.llm_covers.default_model)) -- NOTE this makes things slower, but more stable
local delta = timing.stop()
print("Took " .. delta .. " minutes.")
@@ -165,6 +165,7 @@ local convert_ebooks = function(books)
if utility.path_exists(extracted_file) then
data.extracted_file = extracted_file
data.extracted_file_size = utility.file_size(extracted_file)
end
end
end