| 10552 | } |
| 10553 | |
| 10554 | bool llama_load_session_file(struct llama_context * ctx, const char * path_session, llama_token * tokens_out, size_t n_token_capacity, size_t * n_token_count_out) { |
| 10555 | try { |
| 10556 | return llama_load_session_file_internal(ctx, path_session, tokens_out, n_token_capacity, n_token_count_out); |
| 10557 | } catch (const std::exception & err) { |
| 10558 | LLAMA_LOG_ERROR("error loading session file: %s\n", err.what()); |
| 10559 | return false; |
| 10560 | } |
| 10561 | } |
| 10562 | |
| 10563 | bool llama_save_session_file(struct llama_context * ctx, const char * path_session, const llama_token * tokens, size_t n_token_count) { |
| 10564 | llama_file file(path_session, "wb"); |
no test coverage detected