Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/memory / / toSpanAttributes

Function: toSpanAttributes()

ts
function toSpanAttributes(annotation): Readonly<Record<string, string>>;

Defined in: packages/memory/src/context-engine/annotations.ts:138

Convert a ContentAnnotation to a span-attributes record suitable for AISpan.setAttributes(...).

Parameters

ParameterType
annotationContentAnnotation

Returns

Readonly<Record&lt;string, string&gt;>

Stable