Function: attachConversation()

attachConversation(args: { conversation: { id: string; }; entity: LixEntityCanonical | LixEntity; lix: Pick<Lix, "db">; versionId?: string; }): Promise<void>

Attaches a conversation to an entity (creates mapping).

Examples

// Attach an existing conversation to an entity
await attachConversation({
  lix,
  entity: { entity_id: "para_123", schema_key: "markdown_paragraph", file_id: "README.md" },
  conversation: { id: "conv_123" }
});
// Scope the mapping to a specific version
await attachConversation({
  lix,
  entity: { entity_id: "para_123", schema_key: "markdown_paragraph", file_id: "README.md" },
  conversation: { id: "conv_123" },
  versionId: "v1"
});

Parameters

ParameterType
args{ conversation: { id: string; }; entity: LixEntityCanonical | LixEntity; lix: Pick<Lix, "db">; versionId?: string; }
args.conversation{ id: string; }
args.conversation.idstring
args.entityLixEntityCanonical | LixEntity
args.lixPick<Lix, "db">
args.versionId?string

Returns

Promise<void>