# Write and use multi-formats

You can use multiple formats

In `main.js`

```javascript
import code from './main.converse'

export default {
    code,
    formats: {
        quickReplies(text, [actions]) {
            return {
                text,
                actions
            }
        },
        image(text, [image]) {
            return {
                text, 
                image
            }
        }
    }
}
```

In ConverseScript:

```typescript
@Event('start')
start() {
    @Format('image', 'test.com')
    @Format('quickReplies', ['yes', 'no'])
    > test
}
```

the result is

```javascript
{
    image: { text: 'test', image: 'test.com' },
    quickReplies: {
        text: { text: 'test', image: 'test.com' },
        actions: [ 'yes', 'no' ]
    }
}
```

### Merge formats

In `main.js`

```javascript
import code from './main.converse'

export default {
    code,
    formats: {
        quickReplies(text, [actions]) {
            return {
                text,
                actions
            }
        },
        image(text, [image]) {
            return {
                text, 
                image
            }
        }
    },
    mergeMultiFormats: true
}
```

In ConverseScript:

```typescript
@Event('start')
start() {
    @Format('image', 'test.com')
    @Format('quickReplies', ['yes', 'no'])
    > test
}
```

the result is

```javascript
{ 
    text: 'test', 
    actions: [ 'yes', 'no' ], 
    image: 'test.com' 
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.newbot.io/use-newbot-framework-js/write-formats/write-and-use-multi-formats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
