mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-02 02:51:17 +02:00
speculative decoding initial impl completed (+6 squashed commit)
Squashed commit: [0a6306ca0] draft wip dont use (will be squashed) [a758a1c9c] wip dont use (will be squashed) [e1994d3ce] wip dont use [f59690d68] wip [77228147d] wip on spec decoding. dont use yet [2445bca54] wip adding speculative decoding (+1 squashed commits) Squashed commits: [50e341bb7] wip adding speculative decoding
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
#include <sstream>
|
||||
#include <ctime>
|
||||
|
||||
|
||||
void utreplace(std::string & str, const std::string & needle, const std::string & replacement) {
|
||||
@@ -302,3 +303,14 @@ std::vector<uint8_t> kcpp_base64_decode(const std::string & encoded_string)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string get_timestamp_str()
|
||||
{
|
||||
std::time_t t = std::time(nullptr);
|
||||
std::tm* now = std::localtime(&t);
|
||||
char buffer[16]; // Buffer to hold "hh:mm:ss" and null terminator
|
||||
std::sprintf(buffer, "%02d:%02d:%02d", now->tm_hour, now->tm_min, now->tm_sec);
|
||||
// Convert the buffer to a std::string
|
||||
std::string timestamp(buffer);
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user