Planck.AI.ReqLLMBehaviour behaviour (Planck.AI v0.1.0)

Copy Markdown View Source

Behaviour wrapping the req_llm streaming call.

Exists so that Planck.AI.Adapter can be tested without making real HTTP requests. In production, Planck.AI.ReqLLM delegates directly to ReqLLM.stream_text/3. In tests, Planck.AI.MockReqLLM is injected via application config.

Summary

Callbacks

stream_text(model_spec, messages, opts)

@callback stream_text(model_spec :: term(), messages :: term(), opts :: keyword()) ::
  {:ok, term()} | {:error, term()}