View Source Shifts.Chat (Shifts v0.0.2)

TODO

Summary

Types

t()

TODO

Types

@type t() :: %Shifts.Chat{
  final: boolean(),
  llm: Shifts.LLM.adapter(),
  messages: [Shifts.Message.t() | t()],
  system: String.t() | nil,
  tools: [Shifts.Tool.t()]
}

TODO

Functions

Link to this function

add_message(chat, message)

View Source
@spec add_message(t(), Shifts.Message.t()) :: t()

TODO

Link to this function

add_message(chat, role, content)

View Source
@spec add_message(t(), Shifts.Message.role(), String.t()) :: t()

TODO

@spec finalize(t()) :: Shifts.ChatResult.t()

TODO

Link to this function

generate_next_message(chat)

View Source
@spec generate_next_message(t()) :: t()

TODO

Link to this function

handle_tool_use(chat, shift)

View Source
@spec handle_tool_use(t(), Shifts.Shift.t()) :: t()

TODO

@spec init(Shifts.LLM.adapter()) :: t()

TODO

Link to this function

put_system(chat, prompt)

View Source
@spec put_system(t(), String.t() | nil) :: t()

TODO

@spec put_tools(t(), [Shifts.Tool.t()]) :: t()