extractCitations
Normalize Citations out of a message's additional_kwargs (reading
citations or sources). Exposed for advanced consumers building custom
adapters or bridging non-LangGraph message shapes into the neutral
Citation[] form.
import { extractCitations } from '@threadplane/langgraph';Declaration · overload 1
export declare function extractCitations(msg: KwargsLike): Citation[] | undefined;Parameters
msg· requiredKwargsLikeAny object with an
additional_kwargsbag (e.g. a LangChain message).
Returns
Citation[] | undefinedThe normalized citations, or undefined when none are present.
Examples
const citations = extractCitations(lcMessage);