# `LlmCall.Dialect.Adapter`
[🔗](https://github.com/gilbertwong96/llm_call/blob/main/lib/llm_call/dialect/adapter.ex#L1)

`use` for a completion adapter.

Injects the behaviour, the canonical aliases, the codec's own name, and
`encode_request/2`:

    use LlmCall.Dialect.Adapter, codec: :openai_chat

    @path "/v1/chat/completions"
    @headers [{"content-type", "application/json"}]

`@path` and `@headers` may appear anywhere in the module body; they are read
once the module finishes, so declaration order does not matter.

The codec still supplies `info/0`, `capabilities/2`, `validate_request/2`, and
a private `body/2` that returns the wire body for a validated request.

Pass `encode: false` when the protocol needs its own `encode_request/2` — for
example a per-model path or a non-`POST` method.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
