Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/provider / / serialiseMessageForCount
Function: serialiseMessageForCount()
ts
function serialiseMessageForCount(msg): SerializedMessage;Defined in: packages/provider/src/counters/serialize.ts:31
Internal
Project a Message into a flat string suitable for tokenizers that do not understand multimodal content. Image / audio / file parts are replaced with the canonical placeholder [image] / [audio] / [file] so byte counts stay deterministic.
Parameters
| Parameter | Type |
|---|---|
msg | Message |