Function: toTermInputDto()
@kortexya/reasoninglayer / toTermInputDto
Function: toTermInputDto()
Section titled “Function: toTermInputDto()”toTermInputDto(
input):TermInputDto
Defined in: src/utils/convert.ts:458
Convert a PsiTermInput or already-formatted TermInputDto to TermInputDto.
Parameters
Section titled “Parameters”PsiTermInput from psi() or an already-formatted TermInputDto.
Returns
Section titled “Returns”A TermInputDto suitable for inference request bodies.
Remarks
Section titled “Remarks”If the input is already a TermInputDto, it is returned as-is.
If it is a PsiTermInput, it is converted by stripping the brand field
and converting features to untagged format.
Example
Section titled “Example”toTermInputDto(psi("person", { name: "Alice" }))// { sortName: "person", features: { name: "Alice" } }