| 598 | }; |
| 599 | |
| 600 | mtmd_context * mtmd_init_from_file(const char * mmproj_fname, |
| 601 | const struct llama_model * text_model, |
| 602 | const struct mtmd_context_params ctx_params) { |
| 603 | try { |
| 604 | return new mtmd_context(mmproj_fname, text_model, ctx_params); |
| 605 | } catch (const std::exception & e) { |
| 606 | LOG_ERR("%s: error: %s\n", __func__, e.what()); |
| 607 | return nullptr; |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | void mtmd_free(mtmd_context * ctx) { |
| 612 | delete ctx; |
no test coverage detected