INNER CODE UNIT · TypeScript
toMemory
caura-ai/caura · clients/typescript/src/index.ts:163
function toMemory(d: Record<string, any>): Memory {
return {
id: d.id ?? null,
content: d.content ?? "",
title: d.title ?? null,
memoryType: d.memory_type ?? null,
tenantId: d.tenant_id ?? null,
agentId: d.agent_id ?? null,
weight: d.weight ?? null,
similarity: d.similarity ?? null,
metadata: d.metadata ?? null,
raw: d,
};
}
export class Caura {
readonly tenantId: string;
readonly agentId?: string;