> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# fromYaml

> Build a PromptObjectModel from YAML data (static).

[ref-pom]: /docs/server-sdks/reference/typescript/agents/pom-object-model

[ref-toyaml]: /docs/server-sdks/reference/typescript/agents/pom-object-model/to-yaml

Static factory that reconstructs a [`PromptObjectModel`][ref-pom] from YAML
data. Use this to restore a model serialized via [`toYaml()`][ref-toyaml].

## **Parameters**

Either a YAML string or an already-parsed array of section data objects. A
string is parsed as YAML; anything else is used directly.

## **Returns**

[`PromptObjectModel`][ref-pom] -- A new model populated from the supplied data.

## **Example**

```typescript {10}
import { PromptObjectModel } from '@signalwire/sdk';

const yaml = `
- title: Intro
  body: Welcome.
- title: Rules
  bullets:
    - Be nice.
`;

const pom = PromptObjectModel.fromYaml(yaml);
console.log(pom.renderMarkdown());
```