Shared utility functions for Chroma operations.
Shared utility functions for Chroma operations.
(content-hash content)Compute SHA-256 hash of content for deduplication.
Compute SHA-256 hash of content for deduplication.
(expired? metadata)Check if an entry has expired based on :expires metadata.
Check if an entry has expired based on :expires metadata.
(generate-id)Generate a unique ID for memory entries (timestamp + random hex).
Generate a unique ID for memory entries (timestamp + random hex).
(iso-timestamp)Return current ISO 8601 timestamp.
Return current ISO 8601 timestamp.
(join-tags tags)Join tags vector to comma-separated string.
Join tags vector to comma-separated string.
(memory-to-document {:keys [content type tags]})Convert memory entry to searchable document string.
Convert memory entry to searchable document string.
(metadata->entry {:keys [id document metadata]})Convert Chroma metadata format to domain entry map.
Convert Chroma metadata format to domain entry map.
Default values for entry metadata fields.
Default values for entry metadata fields.
(normalize-duration duration)Normalize duration string to canonical value.
Normalize duration string to canonical value.
(parse-zoned-datetime s)Parse ISO string to ZonedDateTime, returns nil on failure.
Parse ISO string to ZonedDateTime, returns nil on failure.
(serialize-content content)Serialize content to string for storage.
Serialize content to string for storage.
(split-tags tags-str)Split comma-separated tags string into vector.
Split comma-separated tags string into vector.
(time-between? time start end)Check if time is between start (exclusive) and end (exclusive).
Check if time is between start (exclusive) and end (exclusive).
(try-parse-json s)Parse JSON string, return original on failure.
Parse JSON string, return original on failure.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |