MCPcopy Create free account
hub / github.com/TanStack/ai / custom

Function custom

examples/ts-react-chat/src/routes/generation-hooks.tsx:697–704  ·  view source on GitHub ↗
(name: string, value: unknown)

Source from the content-addressed store, hash-verified

695}
696
697function custom(name: string, value: unknown): StreamChunk {
698 return {
699 type: EventType.CUSTOM,
700 name,
701 value,
702 timestamp: Date.now(),
703 }
704}
705
706function toRecord(value: unknown): Record<string, unknown> {
707 return value && typeof value === 'object' && !Array.isArray(value)

Callers 3

connectFunction · 0.85
progressFunction · 0.85
resultFunction · 0.85

Calls 1

nowMethod · 0.80

Tested by

no test coverage detected