Skip to content

Commit

Permalink
update(fildesh): v0.2.0 with s/pathname/filepath/
Browse files Browse the repository at this point in the history
  • Loading branch information
grencez committed Sep 16, 2024
1 parent 92a8db8 commit a83a9c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dep/cmake_fetchcontent/fildesh.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FetchContent_Declare(
Fildesh
GIT_REPOSITORY "https://github.com/fildesh/fildesh.git"
GIT_TAG "e9421ebbb546cf38bf2051d02fdc38dcf71f8216"
GIT_TAG "96a8a1e17d752e20414dccc4766e8cd1465835d3"
)
FetchContent_MakeAvailable(Fildesh)
set(Fildesh_INCLUDE_DIRS ${Fildesh_INCLUDE_DIRS} PARENT_SCOPE)
Expand Down
4 changes: 2 additions & 2 deletions src/chat/opt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ rendezllama::slurp_sxpb_options_close_FildeshX(
&opt.model_token_limit, sxpb, top_it, "model_token_limit");

if (lone_subfield_at_FildeshSxpb_to_str(&s, sxpb, top_it, "x_priming")) {
const std::string priming_filename = fildesh::sibling_pathname(
const std::string priming_filename = fildesh::sibling_filepath(
sxpb_filename.c_str(), s);
std::string content;
if (!fildesh::slurp_file_to_string(content, priming_filename.c_str())) {
Expand All @@ -448,7 +448,7 @@ rendezllama::slurp_sxpb_options_close_FildeshX(
}

if (lone_subfield_at_FildeshSxpb_to_str(&s, sxpb, top_it, "x_answer")) {
const std::string answer_filename = fildesh::sibling_pathname(
const std::string answer_filename = fildesh::sibling_filepath(
sxpb_filename.c_str(), s);
std::string content;
if (!fildesh::slurp_file_to_string(content, answer_filename.c_str())) {
Expand Down
12 changes: 6 additions & 6 deletions test/manual/chat.fildesh
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#!/usr/bin/env fildesh

(: model_file Filename
(: model_file Filepath
(?? .self.opt.model
"/mnt/llama_model_data/quantize/gold/chatml/openhermes-2.5-mistral-16k-7b.Q8_0.gguf"))
(: preset_file Filename (?? .self.opt.preset "/dev/null"))
(: preset_file Filepath (?? .self.opt.preset "/dev/null"))
(: scene Str (?? .self.opt.scene "roshambo_kira"))
(: setting_file Filename
(: setting_file Filepath
(?? .self.opt.setting
(++ "example/prompt/" scene "/setting.sxpb")))
(: thread_count Str (?? .self.opt.thread_count "8"))

|< zec / $(XOF setting_file) /
|< splice / $(XOF setting_file) /
|- replace_string "example/prompt/"
|- replace_string "/setting"
|- replace_string ".sxpb"
|- replace_string "/" "_"
|- zec / "bld/example/prompt/" / -
|> zec -o $(OF transcript_file) -- - / ".txt" /
|- splice / "bld/example/prompt/" / -
|> splice -o $(OF transcript_file) -- - / ".txt" /

|< stdin
|- ./bld/src/chat/chat \
Expand Down

0 comments on commit a83a9c9

Please sign in to comment.