FlattenedHint
This is the flattened version of a hint. Ensure that you DO NOT reference the Asset here as you can create an infinite loop within the packaging.
Properties
Name | Type |
---|---|
schema | EmbeddedModelSchema |
id | string |
created | GroupedTimestamp |
updated | GroupedTimestamp |
deleted | GroupedTimestamp |
mechanism | MechanismEnum |
asset | ReferencedAsset |
type | HintTypeEnum |
text | string |
model | ReferencedModel |
score | Score |
Example
import { FlattenedHint } from '@pieces.app/pieces-os-client'
// TODO: Update the object below with actual values
const example: FlattenedHint = {
"schema": null,
"id": null,
"created": null,
"updated": null,
"deleted": null,
"mechanism": null,
"asset": null,
"type": null,
"text": null,
"model": null,
"score": null,
}
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as FlattenedHint
console.log(exampleParsed)