View Source Instructor.Adapter behaviour (Instructor v0.1.0)

Behavior for Instructor.Adapter.

Summary

Types

@type config() :: any()
@type params() :: [Keyword.t()]
@type raw_response() :: any()
@type stream() :: Enumerable.t()

Callbacks

Link to this callback

chat_completion(params, config)

View Source
@callback chat_completion(params(), config()) ::
  stream() | {:ok, raw_response(), String.t()} | {:error, String.t()}
Link to this callback

reask_messages(raw_response, params, config)

View Source
@callback reask_messages(raw_response(), params(), config()) :: [map()]