| 2623 | } |
| 2624 | |
| 2625 | bool llama_state_save_file(llama_context * ctx, const char * path_session, const llama_token * tokens, size_t n_token_count) { |
| 2626 | ctx->synchronize(); |
| 2627 | |
| 2628 | try { |
| 2629 | return ctx->state_save_file(path_session, tokens, n_token_count); |
| 2630 | } catch (const std::exception & err) { |
| 2631 | LLAMA_LOG_ERROR("%s: error saving session file: %s\n", __func__, err.what()); |
| 2632 | return false; |
| 2633 | } |
| 2634 | } |
| 2635 | |
| 2636 | size_t llama_state_seq_get_size(llama_context * ctx, llama_seq_id seq_id) { |
| 2637 | return ctx->state_seq_get_size(seq_id); |
no test coverage detected