A set of capabilities that a language model provides.
Use this to declare what your model can do, like tool calling and guided
generation:
```swift
struct MyLanguageModel: LanguageModel {
var capabilities: LanguageModelCapabilities {
LanguageModelCapabilities([
.toolCalling,
.guidedGeneration,
.reasoning
])
}
}
```
Inspect ``LanguageModel/capabilities`` ahead of time to detect what
the model supports before performing the request:
```swift
// Before prompting the model with a generable type, check whether it
// supports guided generation.
if selectedModel.capabilities.contains(.guidedGeneration) {
let response = try await session.respond(to: "...", generating: MySchema.self)
}
```
When a model doesn't support a capability, the framework can refuse to dispatch
incompatible requests to the executor and throw an
``LanguageModelError/unsupportedCapability(_:)`` error instead.