Class: Relay::Pages::Chat

Inherits:
Base
  • Object
show all
Includes:
Hooks::RequireUser
Defined in:
app/pages/chat.rb

Overview

Renders the chat page.

Instance Method Summary collapse

Methods included from Concerns::View

#cancellable?, #context_window, #format_cost, #format_name, #initials, #markdown, #status_bar, #theme, #theme_href

Methods included from Concerns::Roda

#initialize, #method_missing, #r, #respond_to_missing?

Methods included from Concerns::Context

#contexts, #ctx, #current_context, #default_context, #default_model, #llm, #llms, #mcps, #model, #models, #normalize_model, #provider, #sync_context!, #user, #valid_model?

Methods included from Concerns::Attachment

#attachment

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Relay::Concerns::Roda

Instance Method Details

#callString

Returns:

  • (String)


11
12
13
14
15
16
# File 'app/pages/chat.rb', line 11

def call
  response["content-type"] = "text/html"
  session["provider"] ||= "deepseek"
  session["model"] ||= default_model
  page("chat", title: "Relay", messages: ctx.messages)
end