<!--
{
  "availability" : [
    "Xcode: 27.0.0 -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Evaluations",
  "identifier" : "/documentation/Evaluations/ArgumentValue",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations13ArgumentValueO"
  },
  "title" : "ArgumentValue"
}
-->

# ArgumentValue

A primitive, generable value type for argument specifications.

```
enum ArgumentValue
```

## Overview

```swift
let city: ArgumentValue = "San Francisco"
let count: ArgumentValue = 5
let score: ArgumentValue = 0.95
```

Unlike `StructuredValue`, this enum only contains primitive types (no recursive
array or dictionary) that allows it to work with the `@Generable` macro.

## Topics

### Values

[`case string(String)`](/documentation/Evaluations/ArgumentValue/string(_:))

A string value.

[`case int(Int)`](/documentation/Evaluations/ArgumentValue/int(_:))

An integer value.

[`case double(Double)`](/documentation/Evaluations/ArgumentValue/double(_:))

A double-precision floating-point value.

[`case bool(Bool)`](/documentation/Evaluations/ArgumentValue/bool(_:))

A Boolean value.

### Converting values

[`var structuredValue: StructuredValue`](/documentation/Evaluations/ArgumentValue/structuredValue)

The equivalent structured value representation of this argument value.

[`enum StructuredValue`](/documentation/Evaluations/StructuredValue)

A type-safe representation of JSON values.

## Relationships

### Conforms To

[`Encodable`](/documentation/Swift/Encodable)

[`Decodable`](/documentation/Swift/Decodable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

[`ExpressibleByUnicodeScalarLiteral`](/documentation/Swift/ExpressibleByUnicodeScalarLiteral)

[`ExpressibleByStringLiteral`](/documentation/Swift/ExpressibleByStringLiteral)

[`Hashable`](/documentation/Swift/Hashable)

[`PromptRepresentable`](/documentation/FoundationModels/PromptRepresentable)

[`InstructionsRepresentable`](/documentation/FoundationModels/InstructionsRepresentable)

[`ExpressibleByIntegerLiteral`](/documentation/Swift/ExpressibleByIntegerLiteral)

[`Copyable`](/documentation/Swift/Copyable)

[`ExpressibleByBooleanLiteral`](/documentation/Swift/ExpressibleByBooleanLiteral)

[`Generable`](/documentation/FoundationModels/Generable)

[`ConvertibleFromGeneratedContent`](/documentation/FoundationModels/ConvertibleFromGeneratedContent)

[`ExpressibleByExtendedGraphemeClusterLiteral`](/documentation/Swift/ExpressibleByExtendedGraphemeClusterLiteral)

[`Sendable`](/documentation/Swift/Sendable)

[`ExpressibleByFloatLiteral`](/documentation/Swift/ExpressibleByFloatLiteral)

[`Equatable`](/documentation/Swift/Equatable)

[`ConvertibleToGeneratedContent`](/documentation/FoundationModels/ConvertibleToGeneratedContent)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)