---
title: "appendText(_:segmentID:tokenCount:)"
framework: foundationmodels
role: symbol
role_heading: Type Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: "foundationmodels/languagemodelexecutorgenerationchannel/reasoning/action-swift.struct/appendtext(_:segmentid:tokencount:)"
---

# appendText(_:segmentID:tokenCount:)

## Declaration

```swift
static func appendText(_ text: String, segmentID: String? = nil, tokenCount: Int) -> LanguageModelExecutorGenerationChannel.Reasoning.Action
```

## See Also

### Reasoning action constants

- [replaceTextSegment(_:segmentID:tokenCount:)](foundationmodels/languagemodelexecutorgenerationchannel/reasoning/action-swift.struct/replacetextsegment(_:segmentid:tokencount:).md)
- [updateMetadata(_:)](foundationmodels/languagemodelexecutorgenerationchannel/reasoning/action-swift.struct/updatemetadata(_:).md)
- [updateSignature(_:tokenCount:)](foundationmodels/languagemodelexecutorgenerationchannel/reasoning/action-swift.struct/updatesignature(_:tokencount:).md)
