ExLLama.ChatTemplate behaviour (LLama CPP Nif Wrapper v0.0.2)

Link to this section Summary

Link to this section Types

@type meta() :: Keyword.t() | nil
@type model() :: ExLLama.Model.t()
Link to this type

model_response()

@type model_response() :: {tokens :: integer(), String.t()}
@type thread() :: [map()]

Link to this section Callbacks

Link to this callback

extract_response(response, model, meta)

@callback extract_response(response :: [model_response()], model(), meta()) ::
  {:ok, ExLLama.ChatResponse.t()}
@callback support_list() :: {:ok, MapSet.t()}
Link to this callback

to_context(thread, model, meta)

@callback to_context(thread(), model(), meta()) :: {:ok, String.t()}

Link to this section Functions

Link to this function

extract_response(responses, model, meta)

Link to this function

pick_handler(model, meta)

Link to this function

to_context(thread, model, meta)