Computes FNV-1a hash of the data
| 703 | |
| 704 | // Computes FNV-1a hash of the data |
| 705 | static std::string fnv_hash(const uint8_t * data, size_t len) { |
| 706 | const uint64_t fnv_prime = 0x100000001b3ULL; |
| 707 | uint64_t hash = 0xcbf29ce484222325ULL; |
| 708 | |
| 709 | for (size_t i = 0; i < len; ++i) { |
| 710 | hash ^= data[i]; |
| 711 | hash *= fnv_prime; |
| 712 | } |
| 713 | return std::to_string(hash); |
| 714 | } |
| 715 | |
| 716 | server_tokens process_mtmd_prompt(mtmd_context * mctx, std::string prompt, std::vector<raw_buffer> files) { |
| 717 | mtmd::bitmaps bitmaps; |
no test coverage detected