JavaScript & TypeScript
Generate Object
Generate structured objects based on a schema for your workflows.
Usage
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
input | string | Yes | The input text to generate a response for. |
schema | object | Yes | The JSON schema that defines the structure of the expected response. |
workflowSlug | string | No | The slug of the workflow to use for generation (not required if you’re using a threadId). |
threadId | string | No | Identifier for associating runs with a conversation thread. |
attachments | Attachment[] | No | Array of attachments to include in the generation. |
Return Value
The generateObject
method returns the following object: