MCPcopy Create free account
hub / github.com/tinygrad/tinygrad / encodeMessage

Function encodeMessage

examples/tinychat/tinychat-browser/index.js:921–925  ·  view source on GitHub ↗
(role, content)

Source from the content-addressed store, hash-verified

919 },
920
921 encodeMessage(role, content) {
922 const roleTokens = this.encodeRole(role);
923 const contentTokens = this.encode(content.trim());
924 return [...roleTokens, ...contentTokens, special_tokens["<|eot_id|>"]];
925 },
926 };
927}

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…