---
title: LanguageModelExecutorGenerationChannel.Response.Action
framework: foundationmodels
role: symbol
role_heading: Structure
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.struct
---

# LanguageModelExecutorGenerationChannel.Response.Action

An operation that can be performed on a response entry.

## Declaration

```swift
struct Action
```

## Overview

Overview Action is an enum-like struct; construct one with a leading-dot factory such as appendText(_:segmentID:tokenCount:).

## Topics

### Response action cases

- [addAttachmentSegment(_:)](foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.struct/addattachmentsegment(_:).md)
- [updateCustomSegment(_:)](foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.struct/updatecustomsegment(_:).md)

### Response action constants

- [appendText(_:segmentID:tokenCount:)](foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.struct/appendtext(_:segmentid:tokencount:).md)
- [replaceTextSegment(_:segmentID:tokenCount:)](foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.struct/replacetextsegment(_:segmentid:tokencount:).md)
- [removeAttachmentSegment(id:)](foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.struct/removeattachmentsegment(id:).md)
- [updateMetadata(_:)](foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.struct/updatemetadata(_:).md)

### Type Methods

- [updateUsage(input:output:metadata:)](foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.struct/updateusage(input:output:metadata:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Handling a response

- [action](foundationmodels/languagemodelexecutorgenerationchannel/response/action-swift.property.md)
- [entryID](foundationmodels/languagemodelexecutorgenerationchannel/response/entryid.md)
- [LanguageModelExecutorGenerationChannel.TextSegmentReplacement](foundationmodels/languagemodelexecutorgenerationchannel/textsegmentreplacement.md)
