Documentation
¶
Index ¶
Constants ¶
View Source
const ( // SignatureCacheTTL is how long signatures are valid SignatureCacheTTL = 1 * time.Hour // MaxEntriesPerSession limits memory usage per session MaxEntriesPerSession = 100 // SignatureTextHashLen is the length of the hash key (16 hex chars = 64-bit key space) SignatureTextHashLen = 16 // MinValidSignatureLen is the minimum length for a signature to be considered valid MinValidSignatureLen = 50 )
Variables ¶
This section is empty.
Functions ¶
func CacheSignature ¶
func CacheSignature(sessionID, text, signature string)
CacheSignature stores a thinking signature for a given session and text. Used for Claude models that require signed thinking blocks in multi-turn conversations.
func ClearSignatureCache ¶
func ClearSignatureCache(sessionID string)
ClearSignatureCache clears signature cache for a specific session or all sessions.
func GetCachedSignature ¶
GetCachedSignature retrieves a cached signature for a given session and text. Returns empty string if not found or expired.
func HasValidSignature ¶
HasValidSignature checks if a signature is valid (non-empty and long enough)
Types ¶
type SignatureEntry ¶
SignatureEntry holds a cached thinking signature with timestamp
Click to show internal directories.
Click to hide internal directories.