Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
session_logger.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
13#pragma once
14
16#include <cstdio>
17#include <filesystem>
18#include <string>
19
20namespace entropic {
21
33public:
39 ENTROPIC_EXPORT explicit SessionLogger(
40 const std::filesystem::path& log_dir);
41
46 ENTROPIC_EXPORT ~SessionLogger();
47
49 SessionLogger(const SessionLogger&) = delete;
50 SessionLogger& operator=(const SessionLogger&) = delete;
51
57 ENTROPIC_EXPORT void log_user_input(const std::string& input);
58
65 ENTROPIC_EXPORT void log_raw_token(const char* token, size_t len);
66
71 ENTROPIC_EXPORT void end_turn();
72
78 ENTROPIC_EXPORT bool is_open() const;
79
92 static void raw_token_callback(
93 const char* token, size_t len, void* user_data);
94
95private:
96 FILE* fp_ = nullptr;
97};
98
99} // namespace entropic
Manages session_model.log for raw streaming content.
ENTROPIC_EXPORT ~SessionLogger()
Close the model log file.
ENTROPIC_EXPORT bool is_open() const
Check if the logger is open and writable.
SessionLogger(const SessionLogger &)=delete
Non-copyable.
ENTROPIC_EXPORT void log_user_input(const std::string &input)
Log user input at the start of a turn.
static void raw_token_callback(const char *token, size_t len, void *user_data)
Static callback for StreamThinkFilter raw output.
ENTROPIC_EXPORT void log_raw_token(const char *token, size_t len)
Log a raw token from streaming output.
ENTROPIC_EXPORT void end_turn()
End the current assistant turn.
Symbol visibility macro for all exported symbols.
Activate model on GPU (WARM → ACTIVE).