Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
icppWorld committed Jan 22, 2025
1 parent e8da10b commit 37e5bdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions native/test_tiny_stories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ void test_tiny_stories(MockIC &mockIC) {
"4449444c026c01dd9ad28304016d7101000d0e2d2d70726f6d70742d6361636865156d795f63616368652f70726f6d70742e6361636865122d2d70726f6d70742d63616368652d616c6c0a2d2d73616d706c65727305746f705f70062d2d74656d7003302e31072d2d746f702d7003302e39022d6e023230022d7000",
"", silent_on_trap, my_principal);

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Remove the prompt-cache file if it exists
// '(record { args = vec {"--prompt-cache"; "my_cache/prompt.cache"} })' ->
// '(variant { Ok = record { status_code = 200 : nat16; output = "Ready to start a new chat for cache file .canister_cache/expmt-gtxsw-inftj-ttabj-qhp5s-nozup-n3bbo-k7zvn-dg4he-knac3-lae/sessions/my_cache/prompt.cache"; input = ""; error=""; prompt_remaining=""; generated_eog=false : bool } })'
mockIC.run_test(
std::string(__func__) + ": " + "remove_prompt_cache " + std::to_string(i) +
" - " + model,
std::string(__func__) + ": " + "remove_prompt_cache " +
std::to_string(i) + " - " + model,
remove_prompt_cache,
"4449444c026c01dd9ad28304016d710100020e2d2d70726f6d70742d6361636865156d795f63616368652f70726f6d70742e6361636865",
"4449444c026c06819e846471838fe5800671c897a79907719aa1b2f90c7adb92a2c90d71cdd9e6b30e7e6b01bc8a01000101009701526561647920746f2073746172742061206e6577206368617420666f722063616368652066696c65202e63616e69737465725f63616368652f6578706d742d67747873772d696e66746a2d747461626a2d71687035732d6e6f7a75702d6e3362626f2d6b377a766e2d64673468652d6b6e6163332d6c61652f73657373696f6e732f6d795f63616368652f70726f6d70742e63616368650000c8000000",
Expand Down
1 change: 0 additions & 1 deletion src/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ void remove_prompt_cache() {
ic_api.to_wire(CandidTypeVariant{"Ok", r_out});
}


void run(IC_API &ic_api, const uint64_t &max_tokens) {
std::string error_msg;
if (!is_caller_whitelisted(ic_api, false)) {
Expand Down
3 changes: 2 additions & 1 deletion src/run.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
void new_chat() WASM_SYMBOL_EXPORTED("canister_update new_chat");
void run_query() WASM_SYMBOL_EXPORTED("canister_query run_query");
void run_update() WASM_SYMBOL_EXPORTED("canister_update run_update");
void remove_prompt_cache() WASM_SYMBOL_EXPORTED("canister_update remove_prompt_cache");
void remove_prompt_cache()
WASM_SYMBOL_EXPORTED("canister_update remove_prompt_cache");

bool get_canister_path_session(const std::string &path_session,
const std::string &principal_id,
Expand Down

0 comments on commit 37e5bdd

Please sign in to comment.