Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1b5fbc615 | ||
|
|
f229e7331e |
No files matched your search
+3
-2
@@ -279,10 +279,11 @@ utility.read_file = function(file_name)
|
||||
end)
|
||||
end
|
||||
|
||||
utility.write_file = function(file_name, text)
|
||||
utility.write_file = function(file_name, ...)
|
||||
local text = table.concat{...}
|
||||
return utility.open(file_name, "w", function(file)
|
||||
file:write(text)
|
||||
file:write("\n")
|
||||
-- file:write("\n") -- I need to make sure /I/ handle this instead of trying to automate it
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
+4
-4
@@ -23,11 +23,11 @@ if not config.models then
|
||||
end
|
||||
|
||||
log{
|
||||
-- info = true,
|
||||
-- warning = true,
|
||||
info = true,
|
||||
warning = true,
|
||||
-- debug = true,
|
||||
-- files = true, -- debugging why the wrong files are selected
|
||||
sha = true, -- what the fuck is going on with sha sums?
|
||||
-- sha = true, -- what the fuck is going on with sha sums?
|
||||
}
|
||||
|
||||
local memory_path = "PRIVATE_DATA" .. utility.path_separator .. "memory"
|
||||
@@ -225,7 +225,7 @@ local refresh_sources = function()
|
||||
local file_name = file_list[f]
|
||||
local function loop()
|
||||
local sha512sum = utility.sha512sum(file_name)
|
||||
log("sha", file_name, sha512sum, tostring(embeddings.vectors[sha512sum]))
|
||||
log("sha", file_name, sha512sum, "\n Sum present? " .. tostring(embeddings.vectors[sha512sum]))
|
||||
if embeddings.vectors[sha512sum] then
|
||||
log("debug", file_name .. "\n has already been embedded, skipping.")
|
||||
-- add file reference if it was missing
|
||||
|
||||
@@ -108,7 +108,7 @@ local export_ordered_list_of_prompts = function()
|
||||
output[#output + 1] = "## Scoring\n\n```json\n" .. json.encode(item.scoring, { indent = true, }) .. "\n```\n"
|
||||
end
|
||||
|
||||
utility.write_file("PRIVATE_DATA/Ordered Synopses.md", table.concat(output, "\n"))
|
||||
utility.write_file("PRIVATE_DATA/Ordered Synopses.md", table.concat(output, "\n"), "\n")
|
||||
os.execute("pandoc \"PRIVATE_DATA/Ordered Synopses.md\" -o \"PRIVATE_DATA/Ordered Synopses.epub\"")
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user