FlattenedConversation
This is a flattend version of the Convsersation for DAG-Safety. This will hold together a conversation. Ie allthe message within a conversation. All the additional properties on here used on here like(anchors/assets) are used for context that will seed the conversation. model is a calculated property, and will be the model of the last message sent if applicable. summaries: on the top level here will simply be used to associate a conversation and a summary(this is not used for grounding), grounding.summaries will be used for this.(TODO)
Properties
| Name | Type |
|---|---|
| schema | EmbeddedModelSchema |
| id | string |
| name | string |
| created | GroupedTimestamp |
| updated | GroupedTimestamp |
| deleted | GroupedTimestamp |
| favorited | boolean |
| application | Application |
| annotations | FlattenedAnnotations |
| messages | FlattenedConversationMessages |
| model | ReferencedModel |
| assets | FlattenedAssets |
| websites | FlattenedWebsites |
| anchors | FlattenedAnchors |
| type | ConversationTypeEnum |
| grounding | ConversationGrounding |
| score | Score |
| pipeline | QGPTPromptPipeline |
| demo | boolean |
| summaries | FlattenedWorkstreamSummaries |
Example
import { FlattenedConversation } from '@pieces.app/pieces-os-client'
// TODO: Update the object below with actual values
const example: FlattenedConversation = {
"schema": null,
"id": null,
"name": null,
"created": null,
"updated": null,
"deleted": null,
"favorited": null,
"application": null,
"annotations": null,
"messages": null,
"model": null,
"assets": null,
"websites": null,
"anchors": null,
"type": null,
"grounding": null,
"score": null,
"pipeline": null,
"demo": null,
"summaries": 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 FlattenedConversation
console.log(exampleParsed)