LLM.HTTPClient.Req (LLM v0.2.0)

Copy Markdown View Source

Default Req adapter for LLM.HTTPClient.

Wraps the Req library to implement the LLM.HTTPClient behaviour. This is the production HTTP client used unless overridden via config :llm, :http_client.

In tests, swap this out with a Mox mock:

Mox.defmock(LLM.HTTPClient.Mock, for: LLM.HTTPClient)
config :llm, :http_client, LLM.HTTPClient.Mock