suggestMapping
chainalign-backend / mappingAssistant / suggestMapping
Function: suggestMapping()
suggestMapping(
inferredHeaders,chainAlignModel,dataSample,tenantId,user):Promise<object[]>
Defined in: mappingAssistant.js:96
Uses an LLM to suggest mappings between user-provided column headers and the ChainAlign data model.
Parameters
inferredHeaders
object[]
An array of inferred column headers (with metadata) from the user's data.
chainAlignModel
string[]
An array of fields in the ChainAlign data model.
dataSample
any[]
A small sample of the data (array of objects with inferred headers as keys) for better context.
tenantId
string
The ID of the tenant making the request.
user
any
The user object (e.g., from req.user).
Returns
Promise<object[]>
A promise that resolves to an array of suggested mappings.