---
title: "buildEither(first:)"
framework: foundationmodels
role: symbol
role_heading: Type Method
path: "foundationmodels/promptbuilder/buildeither(first:)"
---

# buildEither(first:)

Creates a builder with the first component.

## Declaration

```swift
static func buildEither(first component: some PromptRepresentable) -> Prompt
```

## See Also

### Building a prompt

- [buildArray(_:)](foundationmodels/promptbuilder/buildarray(_:).md)
- [buildBlock(_:)](foundationmodels/promptbuilder/buildblock(_:).md)
- [buildEither(second:)](foundationmodels/promptbuilder/buildeither(second:).md)
- [buildExpression(_:)](foundationmodels/promptbuilder/buildexpression(_:).md)
- [buildLimitedAvailability(_:)](foundationmodels/promptbuilder/buildlimitedavailability(_:).md)
- [buildOptional(_:)](foundationmodels/promptbuilder/buildoptional(_:).md)
