Function: toTermInputDto()
@kortexya/reasoninglayer / toTermInputDto
Function: toTermInputDto()
toTermInputDto(
input):TermInputDto
Defined in: src/utils/convert.ts:310
Convert a PsiTermInput or already-formatted TermInputDto to TermInputDto.
Parameters
input
PsiTermInput from psi() or an already-formatted TermInputDto.
Returns
A TermInputDto suitable for inference request bodies.
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
toTermInputDto(psi("person", { name: "Alice" }))// { sortName: "person", features: { name: "Alice" } }